- fix coverity
[oweals/gnunet.git] / src / transport / test_transport_api_monitor_peers.c
index 79b39325c8a64f2557d1664dd26900bde8bb46cb..90c96829d41b86bfc7c8958e595c7afa644c7fc0 100644 (file)
@@ -262,12 +262,7 @@ notify_ready (void *cls, size_t size, void *buf)
 static void
 sendtask (void *cls)
 {
-  const struct GNUNET_SCHEDULER_TaskContext *tc;
-
   send_task = NULL;
-  tc = GNUNET_SCHEDULER_get_task_context ();
-  if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
-    return;
   char *receiver_s = GNUNET_strdup (GNUNET_i2s (&p1->id));
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -455,14 +450,22 @@ run (void *cls, char *const *args, const char *cfgfile,
                                             &notify_receive, &notify_connect,
                                             &notify_disconnect, &start_cb,
                                             NULL);
-  pmc_p1 = GNUNET_TRANSPORT_monitor_peers (p1->cfg, NULL, GNUNET_NO, GNUNET_TIME_UNIT_FOREVER_REL, &monitor1_cb, NULL);
+  pmc_p1 = GNUNET_TRANSPORT_monitor_peers (p1->cfg,
+                                           NULL,
+                                           GNUNET_NO,
+                                           &monitor1_cb,
+                                           NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer 1 started\n");
 
   p2 = GNUNET_TRANSPORT_TESTING_start_peer (tth, cfg_file_p2, 2,
                                             &notify_receive, &notify_connect,
                                             &notify_disconnect, &start_cb,
                                             NULL);
-  pmc_p2 = GNUNET_TRANSPORT_monitor_peers (p2->cfg, NULL, GNUNET_NO, GNUNET_TIME_UNIT_FOREVER_REL, &monitor2_cb, NULL);
+  pmc_p2 = GNUNET_TRANSPORT_monitor_peers (p2->cfg,
+                                           NULL,
+                                           GNUNET_NO,
+                                           &monitor2_cb,
+                                           NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer 1 started\n");
   if ((p1 == NULL) || (p2 == NULL))
   {