diff mbox series

[25/29] Start chunks downloader if delta is enabled

Message ID 20211011112156.44192-26-sbabic@denx.de
State Changes Requested
Headers show
Series DELTA Update | expand

Commit Message

Stefano Babic Oct. 11, 2021, 11:21 a.m. UTC
Start the downloader process if delta is activated. The process is
monitored by SWUpdate.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/swupdate.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/core/swupdate.c b/core/swupdate.c
index a31aeb1..a83a5bf 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -41,6 +41,7 @@ 
 #include "network_ipc.h"
 #include "sslapi.h"
 #include "suricatta/suricatta.h"
+#include "delta_process.h"
 #include "progress.h"
 #include "parselib.h"
 #include "swupdate_settings.h"
@@ -843,6 +844,17 @@  int main(int argc, char **argv)
 		freeargs(dwlav);
 	}
 #endif
+#if defined(CONFIG_DELTA)
+	{
+		uid_t uid;
+		gid_t gid;
+		read_settings_user_id(&handle, "download", &uid, &gid);
+		start_subprocess(SOURCE_CHUNKS_DOWNLOADER, "chunks_downloader", uid, gid,
+				cfgfname, ac, av,
+				start_delta_downloader);
+	}
+#endif
+
 
 	/*
 	 * Start all processes added in the config file