aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/util/service.c b/src/util/service.c
index 93a51f220..bdef17361 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -187,7 +187,7 @@ struct GNUNET_SERVICE_Context
187 /** 187 /**
188 * Task ID of the shutdown task. 188 * Task ID of the shutdown task.
189 */ 189 */
190 struct GNUNET_SCHEDULER_Task * shutdown_task; 190 struct GNUNET_SCHEDULER_Task *shutdown_task;
191 191
192 /** 192 /**
193 * Idle timeout for server. 193 * Idle timeout for server.
@@ -1151,11 +1151,7 @@ service_task (void *cls)
1151{ 1151{
1152 struct GNUNET_SERVICE_Context *sctx = cls; 1152 struct GNUNET_SERVICE_Context *sctx = cls;
1153 unsigned int i; 1153 unsigned int i;
1154 const struct GNUNET_SCHEDULER_TaskContext *tc;
1155 1154
1156 tc = GNUNET_SCHEDULER_get_task_context ();
1157 if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
1158 return;
1159 (void) GNUNET_SPEEDUP_start_ (sctx->cfg); 1155 (void) GNUNET_SPEEDUP_start_ (sctx->cfg);
1160 GNUNET_RESOLVER_connect (sctx->cfg); 1156 GNUNET_RESOLVER_connect (sctx->cfg);
1161 if (NULL != sctx->lsocks) 1157 if (NULL != sctx->lsocks)
@@ -1191,9 +1187,8 @@ service_task (void *cls)
1191 { 1187 {
1192 /* install a task that will kill the server 1188 /* install a task that will kill the server
1193 * process if the scheduler ever gets a shutdown signal */ 1189 * process if the scheduler ever gets a shutdown signal */
1194 sctx->shutdown_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, 1190 sctx->shutdown_task = GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
1195 &shutdown_task, 1191 sctx);
1196 sctx);
1197 } 1192 }
1198 sctx->my_handlers = GNUNET_malloc (sizeof (defhandlers)); 1193 sctx->my_handlers = GNUNET_malloc (sizeof (defhandlers));
1199 memcpy (sctx->my_handlers, defhandlers, sizeof (defhandlers)); 1194 memcpy (sctx->my_handlers, defhandlers, sizeof (defhandlers));