aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index b24a95ab2..b7a2f89a2 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -283,7 +283,7 @@ struct P2PPendingMessage
283 /** 283 /**
284 * Actual message to be sent, allocated at the end of the struct: 284 * Actual message to be sent, allocated at the end of the struct:
285 * // msg = (cast) &pm[1]; 285 * // msg = (cast) &pm[1];
286 * // memcpy (&pm[1], data, len); 286 * // GNUNET_memcpy (&pm[1], data, len);
287 */ 287 */
288 const struct GNUNET_MessageHeader *msg; 288 const struct GNUNET_MessageHeader *msg;
289 289
@@ -993,7 +993,7 @@ core_transmit_notify (void *cls,
993 "Transmitting message of type %u to %s\n", 993 "Transmitting message of type %u to %s\n",
994 ntohs (pending->msg->type), 994 ntohs (pending->msg->type),
995 GNUNET_i2s (&peer->id)); 995 GNUNET_i2s (&peer->id));
996 memcpy (&cbuf[off], 996 GNUNET_memcpy (&cbuf[off],
997 pending->msg, 997 pending->msg,
998 msize); 998 msize);
999 off += msize; 999 off += msize;
@@ -1560,9 +1560,9 @@ GDS_NEIGHBOURS_handle_put (enum GNUNET_BLOCK_Type type,
1560 DHT_BLOOM_SIZE)); 1560 DHT_BLOOM_SIZE));
1561 ppm->key = *key; 1561 ppm->key = *key;
1562 pp = (struct GNUNET_PeerIdentity *) &ppm[1]; 1562 pp = (struct GNUNET_PeerIdentity *) &ppm[1];
1563 memcpy (pp, put_path, 1563 GNUNET_memcpy (pp, put_path,
1564 sizeof (struct GNUNET_PeerIdentity) * put_path_length); 1564 sizeof (struct GNUNET_PeerIdentity) * put_path_length);
1565 memcpy (&pp[put_path_length], 1565 GNUNET_memcpy (&pp[put_path_length],
1566 data, 1566 data,
1567 data_size); 1567 data_size);
1568 GNUNET_CONTAINER_DLL_insert_tail (target->head, 1568 GNUNET_CONTAINER_DLL_insert_tail (target->head,
@@ -1693,7 +1693,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
1693 DHT_BLOOM_SIZE)); 1693 DHT_BLOOM_SIZE));
1694 pgm->key = *key; 1694 pgm->key = *key;
1695 xq = (char *) &pgm[1]; 1695 xq = (char *) &pgm[1];
1696 memcpy (xq, xquery, xquery_size); 1696 GNUNET_memcpy (xq, xquery, xquery_size);
1697 if (NULL != reply_bf) 1697 if (NULL != reply_bf)
1698 GNUNET_assert (GNUNET_OK == 1698 GNUNET_assert (GNUNET_OK ==
1699 GNUNET_CONTAINER_bloomfilter_get_raw_data (reply_bf, 1699 GNUNET_CONTAINER_bloomfilter_get_raw_data (reply_bf,
@@ -1804,13 +1804,13 @@ GDS_NEIGHBOURS_handle_reply (const struct GNUNET_PeerIdentity *target,
1804 prm->expiration_time = GNUNET_TIME_absolute_hton (expiration_time); 1804 prm->expiration_time = GNUNET_TIME_absolute_hton (expiration_time);
1805 prm->key = *key; 1805 prm->key = *key;
1806 paths = (struct GNUNET_PeerIdentity *) &prm[1]; 1806 paths = (struct GNUNET_PeerIdentity *) &prm[1];
1807 memcpy (paths, 1807 GNUNET_memcpy (paths,
1808 put_path, 1808 put_path,
1809 put_path_length * sizeof (struct GNUNET_PeerIdentity)); 1809 put_path_length * sizeof (struct GNUNET_PeerIdentity));
1810 memcpy (&paths[put_path_length], 1810 GNUNET_memcpy (&paths[put_path_length],
1811 get_path, 1811 get_path,
1812 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 1812 get_path_length * sizeof (struct GNUNET_PeerIdentity));
1813 memcpy (&paths[put_path_length + get_path_length], 1813 GNUNET_memcpy (&paths[put_path_length + get_path_length],
1814 data, 1814 data,
1815 data_size); 1815 data_size);
1816 GNUNET_CONTAINER_DLL_insert (pi->head, 1816 GNUNET_CONTAINER_DLL_insert (pi->head,
@@ -1983,7 +1983,7 @@ handle_dht_p2p_put (void *cls,
1983 /* extend 'put path' by sender */ 1983 /* extend 'put path' by sender */
1984 if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE)) 1984 if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE))
1985 { 1985 {
1986 memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity)); 1986 GNUNET_memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity));
1987 pp[putlen] = *peer; 1987 pp[putlen] = *peer;
1988 putlen++; 1988 putlen++;
1989 } 1989 }
@@ -2401,7 +2401,7 @@ handle_dht_p2p_result (void *cls,
2401 { 2401 {
2402 struct GNUNET_PeerIdentity xget_path[get_path_length + 1]; 2402 struct GNUNET_PeerIdentity xget_path[get_path_length + 1];
2403 2403
2404 memcpy (xget_path, 2404 GNUNET_memcpy (xget_path,
2405 get_path, 2405 get_path,
2406 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 2406 get_path_length * sizeof (struct GNUNET_PeerIdentity));
2407 xget_path[get_path_length] = *peer; 2407 xget_path[get_path_length] = *peer;
@@ -2429,8 +2429,8 @@ handle_dht_p2p_result (void *cls,
2429 { 2429 {
2430 struct GNUNET_PeerIdentity xput_path[get_path_length + 1 + put_path_length]; 2430 struct GNUNET_PeerIdentity xput_path[get_path_length + 1 + put_path_length];
2431 2431
2432 memcpy (xput_path, put_path, put_path_length * sizeof (struct GNUNET_PeerIdentity)); 2432 GNUNET_memcpy (xput_path, put_path, put_path_length * sizeof (struct GNUNET_PeerIdentity));
2433 memcpy (&xput_path[put_path_length], 2433 GNUNET_memcpy (&xput_path[put_path_length],
2434 xget_path, 2434 xget_path,
2435 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 2435 get_path_length * sizeof (struct GNUNET_PeerIdentity));
2436 2436