allow empty/NULL context message
[oweals/gnunet.git] / src / peerstore / gnunet-peerstore.c
index 68ae1746f2141c0f8caa21bf28f1fa74ab328fa5..25a4f0ff4b5b593e6c0f6ce5fb4539e9c2ae6f7f 100644 (file)
@@ -60,16 +60,15 @@ shutdown_task (void *cls)
  * @param cfg configuration
  */
 static void
-run (void *cls, char *const *args, const char *cfgfile,
+run (void *cls,
+     char *const *args,
+     const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-
-  peerstore_handle = NULL;
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                NULL);
   peerstore_handle = GNUNET_PEERSTORE_connect (cfg);
   GNUNET_assert (NULL != peerstore_handle);
-
   ret = 0;
 }