afm-launch: moves initialisation at bottom
authorJosé Bollo <jose.bollo@iot.bzh>
Mon, 15 Feb 2016 12:42:56 +0000 (13:42 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Mon, 15 Feb 2016 12:42:56 +0000 (13:42 +0100)
Change-Id: I8819baa899f2fa5070b0972fce17922e09d69c05
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afm-launch.c

index cd820c5..d5fb7ce 100644 (file)
@@ -755,22 +755,6 @@ static int launch_remote(
        return rc;
 }
 
-int afm_launch_initialize()
-{
-       int rc;
-       gid_t r, e, s;
-
-       getresgid(&r, &e, &s);
-       if (s && s != e)
-               groupid = s;
-       else
-               groupid = -1;
-
-       rc = read_configuration_file(FWK_LAUNCH_CONF);
-       dump_launchers();
-       return rc;
-}
-
 static struct desc_list *search_launcher(const char *type, enum afm_launch_mode mode)
 {
        struct desc_list *dl;
@@ -840,3 +824,19 @@ int afm_launch(struct afm_launch_desc *desc, pid_t children[2], char **uri)
        }
 }
 
+int afm_launch_initialize()
+{
+       int rc;
+       gid_t r, e, s;
+
+       getresgid(&r, &e, &s);
+       if (s && s != e)
+               groupid = s;
+       else
+               groupid = -1;
+
+       rc = read_configuration_file(FWK_LAUNCH_CONF);
+       dump_launchers();
+       return rc;
+}
+