LOG (GNUNET_ERROR_TYPE_DEBUG,
"Init message timed out\n");
+ h->init_timeout_task_id = GNUNET_SCHEDULER_NO_TASK;
reconnect_arm_monitor_later (h);
}
* @param cls closure with the 'struct GNUNET_ARM_MonitorHandle'
* @param size number of bytes available in buf
* @param buf where the callee should write the message
- * @return number of bytes written to buf
+ * @return number of bytes written to buf
*/
static size_t
transmit_monitoring_init_message (void *cls, size_t size, void *buf)
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,
{
struct GNUNET_ARM_MonitorHandle *h;
- h = GNUNET_malloc (sizeof (struct GNUNET_ARM_MonitorHandle));
+ h = GNUNET_new (struct GNUNET_ARM_MonitorHandle);
h->cfg = GNUNET_CONFIGURATION_dup (cfg);
h->currently_down = GNUNET_YES;
h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
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);