const struct GNUNET_DHT_MonitorStartStopMessage *msg;
msg = (struct GNUNET_DHT_MonitorStartStopMessage *) message;
- r = GNUNET_malloc (sizeof(struct ClientMonitorRecord));
+ r = GNUNET_new (struct ClientMonitorRecord);
r->client = find_active_client(client);
r->type = ntohl(msg->type);
r->key = NULL;
else
{
- r->key = GNUNET_malloc (sizeof (struct GNUNET_HashCode));
+ r->key = GNUNET_new (struct GNUNET_HashCode);
memcpy (r->key, &msg->key, sizeof (struct GNUNET_HashCode));
}
GNUNET_CONTAINER_DLL_insert (monitor_head, monitor_tail, r);
int do_free;
struct GNUNET_HashCode ch;
unsigned int i;
-
+
LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
"XDHT CLIENT-RESULT %s\n",
GNUNET_h2s (key));
frc.type = type;
GNUNET_CONTAINER_multihashmap_get_multiple (forward_map, key, &forward_reply,
&frc);
+
if (GNUNET_NO == frc.do_copy)
{
/* did not match any of the requests, free! */