diff options
Diffstat (limited to 'src/setup/gnunet-setup.c')
-rw-r--r-- | src/setup/gnunet-setup.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/setup/gnunet-setup.c b/src/setup/gnunet-setup.c index 136eff23..6844a076 100644 --- a/src/setup/gnunet-setup.c +++ b/src/setup/gnunet-setup.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file src/gnunet-setup.c | 22 | * @file src/setup/gnunet-setup.c |
23 | * @brief Main function of gnunet-setup | 23 | * @brief Main function of gnunet-setup |
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
@@ -56,6 +56,12 @@ struct GNUNET_CONFIGURATION_Handle *cfg; | |||
56 | static int gret; | 56 | static int gret; |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Resolver process handle. | ||
60 | */ | ||
61 | struct GNUNET_OS_Process *resolver; | ||
62 | |||
63 | |||
64 | /** | ||
59 | * Get an object from the main window. | 65 | * Get an object from the main window. |
60 | * | 66 | * |
61 | * @param name name of the object | 67 | * @param name name of the object |
@@ -64,6 +70,8 @@ static int gret; | |||
64 | GObject * | 70 | GObject * |
65 | GNUNET_SETUP_get_object (const char *name) | 71 | GNUNET_SETUP_get_object (const char *name) |
66 | { | 72 | { |
73 | if (NULL == ml) | ||
74 | return NULL; | ||
67 | return GNUNET_GTK_main_loop_get_object (ml, name); | 75 | return GNUNET_GTK_main_loop_get_object (ml, name); |
68 | } | 76 | } |
69 | 77 | ||
@@ -305,6 +313,13 @@ GNUNET_SETUP_quit_cb (GtkObject *object, | |||
305 | gret = 1; | 313 | gret = 1; |
306 | GNUNET_CONFIGURATION_destroy (cfgDefault); | 314 | GNUNET_CONFIGURATION_destroy (cfgDefault); |
307 | GNUNET_CONFIGURATION_destroy (cfg); | 315 | GNUNET_CONFIGURATION_destroy (cfg); |
316 | cfg = NULL; | ||
317 | if (NULL != resolver) | ||
318 | { | ||
319 | GNUNET_break (0 == GNUNET_OS_process_kill (resolver, SIGTERM)); | ||
320 | GNUNET_OS_process_close (resolver); | ||
321 | resolver = NULL; | ||
322 | } | ||
308 | } | 323 | } |
309 | 324 | ||
310 | 325 | ||
@@ -324,7 +339,9 @@ run (void *cls, | |||
324 | cfg = GNUNET_CONFIGURATION_create (); | 339 | cfg = GNUNET_CONFIGURATION_create (); |
325 | (void) GNUNET_CONFIGURATION_load (cfg, cfgName); | 340 | (void) GNUNET_CONFIGURATION_load (cfg, cfgName); |
326 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); | 341 | main_window = GTK_WIDGET (GNUNET_SETUP_get_object ("GNUNET_setup_dialog")); |
327 | 342 | resolver = GNUNET_OS_start_process (NULL, NULL, | |
343 | "gnunet-service-resolver", | ||
344 | "gnunet-service-resolver", NULL); | ||
328 | load_options (); | 345 | load_options (); |
329 | gtk_widget_show (main_window); | 346 | gtk_widget_show (main_window); |
330 | gtk_window_present (GTK_WINDOW (main_window)); | 347 | gtk_window_present (GTK_WINDOW (main_window)); |