-cleaning up client api to test for service availability
[oweals/gnunet.git] / src / arm / arm_monitor_api.c
index 7fa53e732d8b557c3bd970e64c57e91611feebed..f8d41e7908f0161c0519e36cfa222fbc2ed0321e 100644 (file)
@@ -156,6 +156,7 @@ init_timeout_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Init message timed out\n");
 
+  h->init_timeout_task_id = GNUNET_SCHEDULER_NO_TASK;
   reconnect_arm_monitor_later (h);
 }
 
@@ -221,7 +222,7 @@ reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h)
     LOG (GNUNET_ERROR_TYPE_DEBUG,
           "arm_api, GNUNET_CLIENT_connect returned NULL\n");
     if (NULL != h->service_status)
-      h->service_status (h->cls, h, NULL, GNUNET_ARM_SERVICE_STOPPED);
+      h->service_status (h->cls, NULL, GNUNET_ARM_SERVICE_STOPPED);
     return GNUNET_SYSERR;
   }
   LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -347,7 +348,7 @@ monitor_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
     GNUNET_CLIENT_receive (h->monitor, &monitor_notify_handler, h,
                            GNUNET_TIME_UNIT_FOREVER_REL);
     if (NULL != h->service_status)
-      h->service_status (h->cls, h, (const char *) &res[1], status);
+      h->service_status (h->cls, (const char *) &res[1], status);
     break;
   default:
     reconnect_arm_monitor_later (h);