aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-xdht_neighbours.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-xdht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-xdht_neighbours.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/dht/gnunet-service-xdht_neighbours.c b/src/dht/gnunet-service-xdht_neighbours.c
index 3464de844..b5c17361b 100644
--- a/src/dht/gnunet-service-xdht_neighbours.c
+++ b/src/dht/gnunet-service-xdht_neighbours.c
@@ -653,7 +653,7 @@ struct P2PPendingMessage
653 /** 653 /**
654 * Actual message to be sent, allocated at the end of the struct: 654 * Actual message to be sent, allocated at the end of the struct:
655 * // msg = (cast) &pm[1]; 655 * // msg = (cast) &pm[1];
656 * // memcpy (&pm[1], data, len); 656 * // GNUNET_memcpy (&pm[1], data, len);
657 */ 657 */
658 const struct GNUNET_MessageHeader *msg; 658 const struct GNUNET_MessageHeader *msg;
659 659
@@ -1012,7 +1012,7 @@ core_transmit_notify (void *cls, size_t size, void *buf)
1012 ("# Bytes transmitted to other peers"), 1012 ("# Bytes transmitted to other peers"),
1013 msize, 1013 msize,
1014 GNUNET_NO); 1014 GNUNET_NO);
1015 memcpy (&cbuf[off], pending->msg, msize); 1015 GNUNET_memcpy (&cbuf[off], pending->msg, msize);
1016 off += msize; 1016 off += msize;
1017 peer->pending_count--; 1017 peer->pending_count--;
1018 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending); 1018 GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending);
@@ -1125,7 +1125,7 @@ GDS_NEIGHBOURS_send_trail_setup (struct GNUNET_PeerIdentity source_peer,
1125 if (trail_length > 0) 1125 if (trail_length > 0)
1126 { 1126 {
1127 peer_list = (struct GNUNET_PeerIdentity *) &tsm[1]; 1127 peer_list = (struct GNUNET_PeerIdentity *) &tsm[1];
1128 memcpy (peer_list, trail_peer_list, trail_length * sizeof(struct GNUNET_PeerIdentity)); 1128 GNUNET_memcpy (peer_list, trail_peer_list, trail_length * sizeof(struct GNUNET_PeerIdentity));
1129 } 1129 }
1130 1130
1131 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 1131 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
@@ -1193,7 +1193,7 @@ GDS_NEIGHBOURS_send_trail_setup_result (struct GNUNET_PeerIdentity querying_peer
1193 tsrm->ulitmate_destination_finger_value = 1193 tsrm->ulitmate_destination_finger_value =
1194 GNUNET_htonll (ultimate_destination_finger_value); 1194 GNUNET_htonll (ultimate_destination_finger_value);
1195 peer_list = (struct GNUNET_PeerIdentity *) &tsrm[1]; 1195 peer_list = (struct GNUNET_PeerIdentity *) &tsrm[1];
1196 memcpy (peer_list, trail_peer_list, trail_length * sizeof (struct GNUNET_PeerIdentity)); 1196 GNUNET_memcpy (peer_list, trail_peer_list, trail_length * sizeof (struct GNUNET_PeerIdentity));
1197 1197
1198 /* Send the message to chosen friend. */ 1198 /* Send the message to chosen friend. */
1199 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 1199 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
@@ -1311,7 +1311,7 @@ GDS_NEIGHBOURS_send_trail_rejection (struct GNUNET_PeerIdentity source_peer,
1311 peer_list = (struct GNUNET_PeerIdentity *) &trm[1]; 1311 peer_list = (struct GNUNET_PeerIdentity *) &trm[1];
1312 if (trail_length > 0) 1312 if (trail_length > 0)
1313 { 1313 {
1314 memcpy (peer_list, trail_peer_list, trail_length * sizeof (struct GNUNET_PeerIdentity)); 1314 GNUNET_memcpy (peer_list, trail_peer_list, trail_length * sizeof (struct GNUNET_PeerIdentity));
1315 } 1315 }
1316 1316
1317 /* Send the message to chosen friend. */ 1317 /* Send the message to chosen friend. */
@@ -1371,7 +1371,7 @@ GDS_NEIGHBOURS_send_verify_successor_message (struct GNUNET_PeerIdentity source_
1371 vsm->successor = successor; 1371 vsm->successor = successor;
1372 vsm->trail_id = trail_id; 1372 vsm->trail_id = trail_id;
1373 peer_list = (struct GNUNET_PeerIdentity *) &vsm[1]; 1373 peer_list = (struct GNUNET_PeerIdentity *) &vsm[1];
1374 memcpy (peer_list, trail, trail_length * sizeof (struct GNUNET_PeerIdentity)); 1374 GNUNET_memcpy (peer_list, trail, trail_length * sizeof (struct GNUNET_PeerIdentity));
1375 1375
1376 /* Send the message to chosen friend. */ 1376 /* Send the message to chosen friend. */
1377 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 1377 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
@@ -1497,7 +1497,7 @@ GDS_NEIGHBOURS_send_verify_successor_result (struct GNUNET_PeerIdentity querying
1497 vsmr->trail_direction = htonl (trail_direction); 1497 vsmr->trail_direction = htonl (trail_direction);
1498 vsmr->trail_id = trail_id; 1498 vsmr->trail_id = trail_id;
1499 peer_list = (struct GNUNET_PeerIdentity *) &vsmr[1]; 1499 peer_list = (struct GNUNET_PeerIdentity *) &vsmr[1];
1500 memcpy (peer_list, trail, trail_length * sizeof (struct GNUNET_PeerIdentity)); 1500 GNUNET_memcpy (peer_list, trail, trail_length * sizeof (struct GNUNET_PeerIdentity));
1501 1501
1502 /* Send the message to chosen friend. */ 1502 /* Send the message to chosen friend. */
1503 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 1503 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
@@ -1557,7 +1557,7 @@ GDS_NEIGHBOURS_send_notify_new_successor (struct GNUNET_PeerIdentity source_peer
1557 nsm->source_peer = source_peer; 1557 nsm->source_peer = source_peer;
1558 nsm->trail_id = succesor_trail_id; 1558 nsm->trail_id = succesor_trail_id;
1559 peer_list = (struct GNUNET_PeerIdentity *) &nsm[1]; 1559 peer_list = (struct GNUNET_PeerIdentity *) &nsm[1];
1560 memcpy (peer_list, successor_trail, 1560 GNUNET_memcpy (peer_list, successor_trail,
1561 successor_trail_length * sizeof (struct GNUNET_PeerIdentity)); 1561 successor_trail_length * sizeof (struct GNUNET_PeerIdentity));
1562 1562
1563 /* Send the message to chosen friend. */ 1563 /* Send the message to chosen friend. */
@@ -1617,7 +1617,7 @@ GDS_NEIGHBOURS_send_add_trail (struct GNUNET_PeerIdentity source_peer,
1617 adm->destination_peer = destination_peer; 1617 adm->destination_peer = destination_peer;
1618 adm->trail_id = trail_id; 1618 adm->trail_id = trail_id;
1619 peer_list = (struct GNUNET_PeerIdentity *)&adm[1]; 1619 peer_list = (struct GNUNET_PeerIdentity *)&adm[1];
1620 memcpy (peer_list, trail, sizeof (struct GNUNET_PeerIdentity) * trail_length); 1620 GNUNET_memcpy (peer_list, trail, sizeof (struct GNUNET_PeerIdentity) * trail_length);
1621 1621
1622 /* Send the message to chosen friend. */ 1622 /* Send the message to chosen friend. */
1623 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 1623 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
@@ -1699,8 +1699,8 @@ select_closest_finger (const struct GNUNET_PeerIdentity *peer1,
1699 uint64_t peer1_value; 1699 uint64_t peer1_value;
1700 uint64_t peer2_value; 1700 uint64_t peer2_value;
1701 1701
1702 memcpy (&peer1_value, peer1, sizeof (uint64_t)); 1702 GNUNET_memcpy (&peer1_value, peer1, sizeof (uint64_t));
1703 memcpy (&peer2_value, peer2, sizeof (uint64_t)); 1703 GNUNET_memcpy (&peer2_value, peer2, sizeof (uint64_t));
1704 peer1_value = GNUNET_ntohll (peer1_value); 1704 peer1_value = GNUNET_ntohll (peer1_value);
1705 peer2_value = GNUNET_ntohll (peer2_value); 1705 peer2_value = GNUNET_ntohll (peer2_value);
1706 1706
@@ -1756,8 +1756,8 @@ select_closest_predecessor (const struct GNUNET_PeerIdentity *peer1,
1756 uint64_t peer1_value; 1756 uint64_t peer1_value;
1757 uint64_t peer2_value; 1757 uint64_t peer2_value;
1758 1758
1759 memcpy (&peer1_value, peer1, sizeof (uint64_t)); 1759 GNUNET_memcpy (&peer1_value, peer1, sizeof (uint64_t));
1760 memcpy (&peer2_value, peer2, sizeof (uint64_t)); 1760 GNUNET_memcpy (&peer2_value, peer2, sizeof (uint64_t));
1761 peer1_value = GNUNET_ntohll (peer1_value); 1761 peer1_value = GNUNET_ntohll (peer1_value);
1762 peer2_value = GNUNET_ntohll (peer2_value); 1762 peer2_value = GNUNET_ntohll (peer2_value);
1763 1763
@@ -1843,7 +1843,7 @@ test_friend_peermap_print ()
1843 &key_ret, 1843 &key_ret,
1844 (const void **)&friend)) 1844 (const void **)&friend))
1845 { 1845 {
1846 memcpy (&print_peer, &key_ret, sizeof (struct GNUNET_PeerIdentity)); 1846 GNUNET_memcpy (&print_peer, &key_ret, sizeof (struct GNUNET_PeerIdentity));
1847 FPRINTF (stderr,_("\nSUPU %s, %s, %d, friend = %s, friend->trails_count = %d"), 1847 FPRINTF (stderr,_("\nSUPU %s, %s, %d, friend = %s, friend->trails_count = %d"),
1848 __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer), friend->trails_count); 1848 __FILE__, __func__,__LINE__, GNUNET_i2s(&print_peer), friend->trails_count);
1849 } 1849 }
@@ -2215,10 +2215,10 @@ GDS_NEIGHBOURS_send_put (const struct GNUNET_HashCode *key,
2215 ppm->put_path_length = htonl (put_path_length); 2215 ppm->put_path_length = htonl (put_path_length);
2216 if(put_path_length > 0) 2216 if(put_path_length > 0)
2217 { 2217 {
2218 memcpy (pp, put_path, 2218 GNUNET_memcpy (pp, put_path,
2219 sizeof (struct GNUNET_PeerIdentity) * put_path_length); 2219 sizeof (struct GNUNET_PeerIdentity) * put_path_length);
2220 } 2220 }
2221 memcpy (&pp[put_path_length], data, data_size); 2221 GNUNET_memcpy (&pp[put_path_length], data, data_size);
2222 GNUNET_assert (NULL != target_friend); 2222 GNUNET_assert (NULL != target_friend);
2223 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 2223 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
2224 target_friend->pending_count++; 2224 target_friend->pending_count++;
@@ -2250,7 +2250,7 @@ GDS_NEIGHBOURS_handle_put (const struct GNUNET_HashCode *key,
2250 uint64_t key_value; 2250 uint64_t key_value;
2251 struct Closest_Peer successor; 2251 struct Closest_Peer successor;
2252 2252
2253 memcpy (&key_value, key, sizeof (uint64_t)); 2253 GNUNET_memcpy (&key_value, key, sizeof (uint64_t));
2254 key_value = GNUNET_ntohll (key_value); 2254 key_value = GNUNET_ntohll (key_value);
2255 successor = find_local_best_known_next_hop (key_value, 2255 successor = find_local_best_known_next_hop (key_value,
2256 GDS_FINGER_TYPE_NON_PREDECESSOR); 2256 GDS_FINGER_TYPE_NON_PREDECESSOR);
@@ -2339,7 +2339,7 @@ GDS_NEIGHBOURS_send_get (const struct GNUNET_HashCode *key,
2339 pgm->hop_count = htonl (hop_count + 1); 2339 pgm->hop_count = htonl (hop_count + 1);
2340 pgm->get_path_length = htonl (get_path_length); 2340 pgm->get_path_length = htonl (get_path_length);
2341 gp = (struct GNUNET_PeerIdentity *) &pgm[1]; 2341 gp = (struct GNUNET_PeerIdentity *) &pgm[1];
2342 memcpy (gp, get_path, 2342 GNUNET_memcpy (gp, get_path,
2343 sizeof (struct GNUNET_PeerIdentity) * get_path_length); 2343 sizeof (struct GNUNET_PeerIdentity) * get_path_length);
2344 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending); 2344 GNUNET_CONTAINER_DLL_insert_tail (target_friend->head, target_friend->tail, pending);
2345 target_friend->pending_count++; 2345 target_friend->pending_count++;
@@ -2367,7 +2367,7 @@ GDS_NEIGHBOURS_handle_get(const struct GNUNET_HashCode *key,
2367 struct GNUNET_HashCode intermediate_trail_id; 2367 struct GNUNET_HashCode intermediate_trail_id;
2368 uint64_t key_value; 2368 uint64_t key_value;
2369 2369
2370 memcpy (&key_value, key, sizeof (uint64_t)); 2370 GNUNET_memcpy (&key_value, key, sizeof (uint64_t));
2371 key_value = GNUNET_ntohll (key_value); 2371 key_value = GNUNET_ntohll (key_value);
2372 2372
2373 successor = find_local_best_known_next_hop (key_value, 2373 successor = find_local_best_known_next_hop (key_value,
@@ -2478,11 +2478,11 @@ GDS_NEIGHBOURS_send_get_result (const struct GNUNET_HashCode *key,
2478 get_result->get_path_length = htonl (get_path_length); 2478 get_result->get_path_length = htonl (get_path_length);
2479 get_result->put_path_length = htonl (put_path_length); 2479 get_result->put_path_length = htonl (put_path_length);
2480 paths = (struct GNUNET_PeerIdentity *)&get_result[1]; 2480 paths = (struct GNUNET_PeerIdentity *)&get_result[1];
2481 memcpy (paths, put_path, 2481 GNUNET_memcpy (paths, put_path,
2482 put_path_length * sizeof (struct GNUNET_PeerIdentity)); 2482 put_path_length * sizeof (struct GNUNET_PeerIdentity));
2483 memcpy (&paths[put_path_length], get_path, 2483 GNUNET_memcpy (&paths[put_path_length], get_path,
2484 get_path_length * sizeof (struct GNUNET_PeerIdentity)); 2484 get_path_length * sizeof (struct GNUNET_PeerIdentity));
2485 memcpy (&paths[put_path_length + get_path_length], data, data_size); 2485 GNUNET_memcpy (&paths[put_path_length + get_path_length], data, data_size);
2486 2486
2487 GNUNET_assert (NULL != 2487 GNUNET_assert (NULL !=
2488 (target_friend = 2488 (target_friend =
@@ -2571,7 +2571,7 @@ compute_finger_identity_value (unsigned int finger_index)
2571{ 2571{
2572 uint64_t my_id64; 2572 uint64_t my_id64;
2573 2573
2574 memcpy (&my_id64, &my_identity, sizeof (uint64_t)); 2574 GNUNET_memcpy (&my_id64, &my_identity, sizeof (uint64_t));
2575 my_id64 = GNUNET_ntohll (my_id64); 2575 my_id64 = GNUNET_ntohll (my_id64);
2576 2576
2577 /* Are we looking for immediate predecessor? */ 2577 /* Are we looking for immediate predecessor? */
@@ -3353,7 +3353,7 @@ get_finger_table_index (uint64_t ultimate_destination_finger_value,
3353 uint64_t diff; 3353 uint64_t diff;
3354 unsigned int finger_table_index; 3354 unsigned int finger_table_index;
3355 3355
3356 memcpy (&my_id64, &my_identity, sizeof (uint64_t)); 3356 GNUNET_memcpy (&my_id64, &my_identity, sizeof (uint64_t));
3357 my_id64 = GNUNET_ntohll (my_id64); 3357 my_id64 = GNUNET_ntohll (my_id64);
3358 3358
3359 /* Is this a predecessor finger? */ 3359 /* Is this a predecessor finger? */
@@ -3682,14 +3682,14 @@ handle_dht_p2p_put (void *cls, const struct GNUNET_PeerIdentity *peer,
3682 //if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE)) 3682 //if (0 != (options & GNUNET_DHT_RO_RECORD_ROUTE))
3683 if (1) 3683 if (1)
3684 { 3684 {
3685 memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity)); 3685 GNUNET_memcpy (pp, put_path, putlen * sizeof (struct GNUNET_PeerIdentity));
3686 pp[putlen] = my_identity; 3686 pp[putlen] = my_identity;
3687 putlen++; 3687 putlen++;
3688 } 3688 }
3689 else 3689 else
3690 putlen = 0; 3690 putlen = 0;
3691 3691
3692 memcpy (&key_value, &(put->key), sizeof (uint64_t)); 3692 GNUNET_memcpy (&key_value, &(put->key), sizeof (uint64_t));
3693 struct Closest_Peer successor; 3693 struct Closest_Peer successor;
3694 key_value = GNUNET_ntohll (key_value); 3694 key_value = GNUNET_ntohll (key_value);
3695 successor = find_local_best_known_next_hop (key_value, 3695 successor = find_local_best_known_next_hop (key_value,
@@ -3799,7 +3799,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
3799 ("# Bytes received from other peers"), msize, 3799 ("# Bytes received from other peers"), msize,
3800 GNUNET_NO); 3800 GNUNET_NO);
3801 3801
3802 memcpy (&key_value, &(get->key), sizeof (uint64_t)); 3802 GNUNET_memcpy (&key_value, &(get->key), sizeof (uint64_t));
3803 key_value = GNUNET_ntohll (key_value); 3803 key_value = GNUNET_ntohll (key_value);
3804 3804
3805 /* Check if you are already a part of get path. */ 3805 /* Check if you are already a part of get path. */
@@ -3815,7 +3815,7 @@ handle_dht_p2p_get (void *cls, const struct GNUNET_PeerIdentity *peer,
3815 3815
3816 /* Add yourself in the get path. */ 3816 /* Add yourself in the get path. */
3817 struct GNUNET_PeerIdentity gp[get_length + 1]; 3817 struct GNUNET_PeerIdentity gp[get_length + 1];
3818 memcpy (gp, get_path, get_length * sizeof (struct GNUNET_PeerIdentity)); 3818 GNUNET_memcpy (gp, get_path, get_length * sizeof (struct GNUNET_PeerIdentity));
3819 gp[get_length] = my_identity; 3819 gp[get_length] = my_identity;
3820 get_length = get_length + 1; 3820 get_length = get_length + 1;
3821 GDS_CLIENTS_process_get (get->options, get->block_type, hop_count, 3821 GDS_CLIENTS_process_get (get->options, get->block_type, hop_count,
@@ -4185,7 +4185,7 @@ handle_dht_p2p_trail_setup (void *cls, const struct GNUNET_PeerIdentity *peer,
4185 /* Add yourself to list of peers. */ 4185 /* Add yourself to list of peers. */
4186 struct GNUNET_PeerIdentity peer_list[trail_length + 1]; 4186 struct GNUNET_PeerIdentity peer_list[trail_length + 1];
4187 4187
4188 memcpy (peer_list, trail_peer_list, 4188 GNUNET_memcpy (peer_list, trail_peer_list,
4189 trail_length * sizeof (struct GNUNET_PeerIdentity)); 4189 trail_length * sizeof (struct GNUNET_PeerIdentity));
4190 peer_list[trail_length] = my_identity; 4190 peer_list[trail_length] = my_identity;
4191 GDS_NEIGHBOURS_send_trail_setup (source, 4191 GDS_NEIGHBOURS_send_trail_setup (source,
@@ -4956,9 +4956,9 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ,
4956 uint64_t succ; 4956 uint64_t succ;
4957 char *key; 4957 char *key;
4958 uint64_t my_id; 4958 uint64_t my_id;
4959 memcpy (&my_id, &my_identity, sizeof(uint64_t)); 4959 GNUNET_memcpy (&my_id, &my_identity, sizeof(uint64_t));
4960 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity)); 4960 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity));
4961 memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t)); 4961 GNUNET_memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t));
4962 succ = GNUNET_ntohll(succ); 4962 succ = GNUNET_ntohll(succ);
4963 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str); 4963 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str);
4964 GNUNET_free (my_id_str); 4964 GNUNET_free (my_id_str);
@@ -4989,7 +4989,7 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ,
4989 char *key; 4989 char *key;
4990 4990
4991 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity)); 4991 my_id_str = GNUNET_strdup (GNUNET_i2s_full (&my_identity));
4992 memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t)); 4992 GNUNET_memcpy(&succ, &current_successor->finger_identity, sizeof(uint64_t));
4993 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str); 4993 GNUNET_asprintf (&key, "XDHT:%s:", my_id_str);
4994 GNUNET_free (my_id_str); 4994 GNUNET_free (my_id_str);
4995 GNUNET_STATISTICS_set (GDS_stats, key, succ, 0); 4995 GNUNET_STATISTICS_set (GDS_stats, key, succ, 0);
@@ -5066,7 +5066,7 @@ compare_and_update_successor (struct GNUNET_PeerIdentity curr_succ,
5066 notify_ctx->successor = probable_successor; 5066 notify_ctx->successor = probable_successor;
5067 notify_ctx->successor_trail = 5067 notify_ctx->successor_trail =
5068 GNUNET_malloc(sizeof(struct GNUNET_PeerIdentity) * trail_me_to_probable_succ_len); 5068 GNUNET_malloc(sizeof(struct GNUNET_PeerIdentity) * trail_me_to_probable_succ_len);
5069 memcpy(notify_ctx->successor_trail, trail_me_to_probable_succ, 5069 GNUNET_memcpy(notify_ctx->successor_trail, trail_me_to_probable_succ,
5070 sizeof(struct GNUNET_PeerIdentity) * trail_me_to_probable_succ_len); 5070 sizeof(struct GNUNET_PeerIdentity) * trail_me_to_probable_succ_len);
5071 notify_ctx->successor_trail_length = trail_me_to_probable_succ_len; 5071 notify_ctx->successor_trail_length = trail_me_to_probable_succ_len;
5072 notify_ctx->succesor_trail_id = trail_id; 5072 notify_ctx->succesor_trail_id = trail_id;
@@ -5477,7 +5477,7 @@ handle_dht_p2p_trail_setup_rejection (void *cls,
5477 unsigned int new_trail_length = trail_length - 1; 5477 unsigned int new_trail_length = trail_length - 1;
5478 struct GNUNET_PeerIdentity trail[new_trail_length]; 5478 struct GNUNET_PeerIdentity trail[new_trail_length];
5479 5479
5480 memcpy (trail, trail_peer_list, new_trail_length * sizeof(struct GNUNET_PeerIdentity)); 5480 GNUNET_memcpy (trail, trail_peer_list, new_trail_length * sizeof(struct GNUNET_PeerIdentity));
5481 if (0 == trail_length) 5481 if (0 == trail_length)
5482 next_peer = source; 5482 next_peer = source;
5483 else 5483 else
@@ -5510,7 +5510,7 @@ handle_dht_p2p_trail_setup_rejection (void *cls,
5510 unsigned int new_trail_length = trail_length - 1; 5510 unsigned int new_trail_length = trail_length - 1;
5511 struct GNUNET_PeerIdentity trail[new_trail_length]; 5511 struct GNUNET_PeerIdentity trail[new_trail_length];
5512 5512
5513 memcpy (trail, trail_peer_list, new_trail_length * sizeof(struct GNUNET_PeerIdentity)); 5513 GNUNET_memcpy (trail, trail_peer_list, new_trail_length * sizeof(struct GNUNET_PeerIdentity));
5514 5514
5515 if (0 == new_trail_length) 5515 if (0 == new_trail_length)
5516 next_peer = source; 5516 next_peer = source;