aboutsummaryrefslogtreecommitdiff
path: root/src/main/gnunet-gtk.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-24 01:10:47 +0000
commit56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13 (patch)
tree7b48bacfa09b34ab988324498e0617732025a512 /src/main/gnunet-gtk.c
parent1e2e74c3ce3ff0f02c1d3fe976fd7b2ba3d327d6 (diff)
downloadgnunet-gtk-56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13.tar.gz
gnunet-gtk-56110d97bc423d8c4a2c8cd66b2bb8486b6ffd13.zip
making GNUNET_SCHEDULER_cancel() perform in O(1) instead of O(n) to help or even fully address #3247
Diffstat (limited to 'src/main/gnunet-gtk.c')
-rw-r--r--src/main/gnunet-gtk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/gnunet-gtk.c b/src/main/gnunet-gtk.c
index fa5cf4a6..7ae21757 100644
--- a/src/main/gnunet-gtk.c
+++ b/src/main/gnunet-gtk.c
@@ -72,7 +72,7 @@ struct Plug
72 /** 72 /**
73 * Task to restart process after crash. 73 * Task to restart process after crash.
74 */ 74 */
75 GNUNET_SCHEDULER_TaskIdentifier restart_task; 75 struct GNUNET_SCHEDULER_Task * restart_task;
76 76
77 /** 77 /**
78 * ID of the signal associated with the window. 78 * ID of the signal associated with the window.
@@ -145,10 +145,10 @@ cleanup_task (void *cls,
145 GNUNET_OS_process_destroy (p->proc); 145 GNUNET_OS_process_destroy (p->proc);
146 p->proc = NULL; 146 p->proc = NULL;
147 } 147 }
148 if (GNUNET_SCHEDULER_NO_TASK != p->restart_task) 148 if (NULL != p->restart_task)
149 { 149 {
150 GNUNET_SCHEDULER_cancel (p->restart_task); 150 GNUNET_SCHEDULER_cancel (p->restart_task);
151 p->restart_task = GNUNET_SCHEDULER_NO_TASK; 151 p->restart_task = NULL;
152 } 152 }
153 /* This object is long gone, as part of the cleanup 153 /* This object is long gone, as part of the cleanup
154 of the window from gtk_window_dispose that is 154 of the window from gtk_window_dispose that is
@@ -224,7 +224,7 @@ restart_process (void *cls,
224 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 224 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
225 _("Restarting crashed plugin `%s'\n"), 225 _("Restarting crashed plugin `%s'\n"),
226 p->binary); 226 p->binary);
227 p->restart_task = GNUNET_SCHEDULER_NO_TASK; 227 p->restart_task = NULL;
228 start_process (p); 228 start_process (p);
229} 229}
230 230