aboutsummaryrefslogtreecommitdiff
path: root/src/common/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/helper.c')
-rw-r--r--src/common/helper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/helper.c b/src/common/helper.c
index 08a0fe64..83a3667a 100644
--- a/src/common/helper.c
+++ b/src/common/helper.c
@@ -67,6 +67,8 @@ static int saveCallsUp;
67 67
68static Plugin * plugin; 68static Plugin * plugin;
69 69
70static void * shutdown_function;
71
70 72
71static gboolean saveCallWrapper(gpointer data) { 73static gboolean saveCallWrapper(gpointer data) {
72 SaveCall * call = data; 74 SaveCall * call = data;
@@ -274,6 +276,9 @@ static void connector(const gchar *handler_name,
274 break; 276 break;
275 plug = plug->next; 277 plug = plug->next;
276 } 278 }
279 if (0 == strcmp(handler_name,
280 "gnunet_gtk_main_quit"))
281 method = shutdown_function;
277 if (method == NULL) { 282 if (method == NULL) {
278 LOG(LOG_DEBUG, 283 LOG(LOG_DEBUG,
279 _("Failed to find handler for `%s'\n"), 284 _("Failed to find handler for `%s'\n"),
@@ -364,9 +369,10 @@ static void unloadPlugin(Plugin * plug) {
364 FREE(plug); 369 FREE(plug);
365} 370}
366 371
367void initGNUnetGTKCommon() { 372void initGNUnetGTKCommon(void * callback) {
368 char * load; 373 char * load;
369 374
375 shutdown_function = callback;
370 MUTEX_CREATE_RECURSIVE(&sclock); 376 MUTEX_CREATE_RECURSIVE(&sclock);
371 PTHREAD_GET_SELF(&mainThread); 377 PTHREAD_GET_SELF(&mainThread);
372 saveCallsUp = YES; 378 saveCallsUp = YES;