{
struct GNUNET_PEERINFO_Handle *h;
- h = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_Handle));
+ h = GNUNET_new (struct GNUNET_PEERINFO_Handle);
h->client = GNUNET_CLIENT_connect ("peerinfo", cfg);
h->cfg = cfg;
return h;
*
* @param ac handle for the add operation to cancel
*/
-void
+void
GNUNET_PEERINFO_add_peer_cancel (struct GNUNET_PEERINFO_AddContext *ac)
{
struct GNUNET_PEERINFO_Handle *h = ac->h;
h->in_receive = GNUNET_YES;
GNUNET_CLIENT_receive (h->client, &peerinfo_handler, h,
GNUNET_TIME_absolute_get_remaining (h->ic_head->timeout));
- }
+ }
if (NULL != cb)
cb (cb_cls, NULL, NULL, NULL);
return;
"Received HELLO for peer `%s', expected peer `%s'\n",
GNUNET_i2s (&im->peer),
GNUNET_i2s (&ic->peer));
-
+
GNUNET_break (0);
GNUNET_PEERINFO_iterate_cancel (ic);
reconnect (h);
- if (NULL != cb)
+ if (NULL != cb)
cb (cb_cls, NULL, NULL,
_("Received invalid message from `PEERINFO' service."));
return;
GNUNET_break (0);
GNUNET_PEERINFO_iterate_cancel (ic);
reconnect (h);
- if (NULL != cb)
+ if (NULL != cb)
cb (cb_cls, NULL, NULL,
_("Received invalid message from `PEERINFO' service."));
return;
GNUNET_break (0);
GNUNET_PEERINFO_iterate_cancel (ic);
reconnect (h);
- if (NULL != cb)
+ if (NULL != cb)
cb (cb_cls, NULL, NULL,
_("Received invalid message from `PEERINFO' service."));
return;
GNUNET_break (0);
GNUNET_PEERINFO_iterate_cancel (ic);
reconnect (h);
- if (NULL != cb)
+ if (NULL != cb)
cb (cb_cls, NULL, NULL,
_("Received invalid message from `PEERINFO' service."));
return;
struct GNUNET_PEERINFO_IteratorContext *ic;
struct GNUNET_PEERINFO_AddContext *ac;
- ic = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_IteratorContext));
+ ic = GNUNET_new (struct GNUNET_PEERINFO_IteratorContext);
if (NULL == peer)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,