diff options
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/util/service.c b/src/util/service.c index 60da8788f..2c84e91f4 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -799,8 +799,7 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
799 | { | 799 | { |
800 | if (GNUNET_SYSERR == | 800 | if (GNUNET_SYSERR == |
801 | (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, | 801 | (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, |
802 | sctx-> | 802 | sctx->serviceName, |
803 | serviceName, | ||
804 | "DISABLEV6"))) | 803 | "DISABLEV6"))) |
805 | return GNUNET_SYSERR; | 804 | return GNUNET_SYSERR; |
806 | } | 805 | } |
@@ -1079,8 +1078,7 @@ write_pid_file (struct GNUNET_SERVICE_Context *sctx, pid_t pid) | |||
1079 | * @param tc unused | 1078 | * @param tc unused |
1080 | */ | 1079 | */ |
1081 | static void | 1080 | static void |
1082 | shutdown_task (void *cls, | 1081 | shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
1083 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1084 | { | 1082 | { |
1085 | struct GNUNET_SERVER_Handle *server = cls; | 1083 | struct GNUNET_SERVER_Handle *server = cls; |
1086 | 1084 | ||
@@ -1116,11 +1114,10 @@ service_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1116 | if (0 == (sctx->options & GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN)) | 1114 | if (0 == (sctx->options & GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN)) |
1117 | { | 1115 | { |
1118 | /* install a task that will kill the server | 1116 | /* install a task that will kill the server |
1119 | process if the scheduler ever gets a shutdown signal */ | 1117 | process if the scheduler ever gets a shutdown signal */ |
1120 | GNUNET_SCHEDULER_add_delayed (tc->sched, | 1118 | GNUNET_SCHEDULER_add_delayed (tc->sched, |
1121 | GNUNET_TIME_UNIT_FOREVER_REL, | 1119 | GNUNET_TIME_UNIT_FOREVER_REL, |
1122 | &shutdown_task, | 1120 | &shutdown_task, sctx->server); |
1123 | sctx->server); | ||
1124 | } | 1121 | } |
1125 | sctx->my_handlers = GNUNET_malloc (sizeof (defhandlers)); | 1122 | sctx->my_handlers = GNUNET_malloc (sizeof (defhandlers)); |
1126 | memcpy (sctx->my_handlers, defhandlers, sizeof (defhandlers)); | 1123 | memcpy (sctx->my_handlers, defhandlers, sizeof (defhandlers)); |
@@ -1297,9 +1294,8 @@ int | |||
1297 | GNUNET_SERVICE_run (int argc, | 1294 | GNUNET_SERVICE_run (int argc, |
1298 | char *const *argv, | 1295 | char *const *argv, |
1299 | const char *serviceName, | 1296 | const char *serviceName, |
1300 | enum GNUNET_SERVICE_Options opt, | 1297 | enum GNUNET_SERVICE_Options opt, |
1301 | GNUNET_SERVICE_Main task, | 1298 | GNUNET_SERVICE_Main task, void *task_cls) |
1302 | void *task_cls) | ||
1303 | { | 1299 | { |
1304 | char *cfg_fn; | 1300 | char *cfg_fn; |
1305 | char *loglev; | 1301 | char *loglev; |