ret->cfg = cfg;
ret->subsystem = GNUNET_strdup (subsystem);
ret->backoff = GNUNET_TIME_UNIT_MILLISECONDS;
- try_connect (ret);
+ if (GNUNET_YES != try_connect (ret))
+ {
+ GNUNET_free (ret->subsystem);
+ GNUNET_free (ret);
+ return NULL;
+ }
return ret;
}
struct GNUNET_TIME_Relative timeout;
int i;
+ if (h == NULL) return;
if (GNUNET_SCHEDULER_NO_TASK != h->backoff_task)
GNUNET_SCHEDULER_cancel (h->backoff_task);
if (sync_first)
}
}
+
/**
* Get statistic from the peer.
*
{
struct GNUNET_STATISTICS_WatchEntry *w;
+ if (handle == NULL)
+ return GNUNET_SYSERR;
w = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_WatchEntry));
w->subsystem = GNUNET_strdup (subsystem);
w->name = GNUNET_strdup (name);