allow empty/NULL context message
[oweals/gnunet.git] / src / namestore / gnunet-service-namestore.c
index 4d60c8ea586807fef33246959f2a74dca721fa65..aeec2d10bd83b4b6ca909cc5540eba4d02c038ed 100644 (file)
@@ -270,10 +270,9 @@ static struct GNUNET_SERVER_NotificationContext *monitor_nc;
  * Task run during shutdown.
  *
  * @param cls unused
- * @param tc unused
  */
 static void
-cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleanup_task (void *cls)
 {
   struct ZoneIteration *no;
   struct NamestoreClient *nc;
@@ -596,7 +595,7 @@ send_lookup_response (struct GNUNET_SERVER_NotificationContext *nc,
   rd_ser = &name_tmp[name_len];
   GNUNET_GNSRECORD_records_serialize (res_count, res, rd_ser_len, rd_ser);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "Sending `%s' message with %u records and size %u\n",
+             "Sending `%s' message with %u records and size %zu\n",
              "RECORD_RESULT",
              res_count,
              msg_size);
@@ -1525,11 +1524,9 @@ monitor_sync (struct ZoneMonitor *zm)
  * Obtain the next datum during the zone monitor's zone intiial iteration.
  *
  * @param cls zone monitor that does its initial iteration
- * @param tc scheduler context
  */
 static void
-monitor_next (void *cls,
-             const struct GNUNET_SCHEDULER_TaskContext *tc);
+monitor_next (void *cls);
 
 
 /**
@@ -1606,11 +1603,9 @@ handle_monitor_start (void *cls,
  * Obtain the next datum during the zone monitor's zone intiial iteration.
  *
  * @param cls zone monitor that does its initial iteration
- * @param tc scheduler context
  */
 static void
-monitor_next (void *cls,
-             const struct GNUNET_SCHEDULER_TaskContext *tc)
+monitor_next (void *cls)
 {
   struct ZoneMonitor *zm = cls;
   int ret;
@@ -1694,8 +1689,8 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
   GNUNET_SERVER_disconnect_notify (server,
                                    &client_disconnect_notification,
                                    NULL);
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&cleanup_task,
+                                NULL);
 }