fix #3284: support lib/MULTIARCH/ paths in installation, use GNUNET_PREFIX=@libdir...
[oweals/gnunet.git] / src / dht / gnunet-service-dht_clients.c
index f91311cf3d24324b0e67377f6133d4f6c68bfcf7..5195fa3ecc2d0ddde693626eb9165355bc96efe3 100644 (file)
@@ -822,7 +822,7 @@ handle_dht_local_monitor (void *cls, struct GNUNET_SERVER_Client *client,
   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);
@@ -833,7 +833,7 @@ handle_dht_local_monitor (void *cls, struct GNUNET_SERVER_Client *client,
       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);
@@ -1023,7 +1023,7 @@ forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
   int do_free;
   struct GNUNET_HashCode ch;
   unsigned int i;
-
+  
   LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
               "XDHT CLIENT-RESULT %s\n",
                GNUNET_h2s (key));
@@ -1198,6 +1198,7 @@ GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
   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! */