diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-12 19:07:40 +0000 |
commit | 6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch) | |
tree | a3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src/dv | |
parent | 16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff) | |
download | gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.tar.gz gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.zip |
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/dv_api.c | 8 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 30 |
2 files changed, 19 insertions, 19 deletions
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index 93891ca17..131503e6e 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c | |||
@@ -154,9 +154,9 @@ struct SendCallbackContext | |||
154 | * @param hash set to uid (extended with zeros) | 154 | * @param hash set to uid (extended with zeros) |
155 | */ | 155 | */ |
156 | static void | 156 | static void |
157 | hash_from_uid (uint32_t uid, GNUNET_HashCode * hash) | 157 | hash_from_uid (uint32_t uid, struct GNUNET_HashCode * hash) |
158 | { | 158 | { |
159 | memset (hash, 0, sizeof (GNUNET_HashCode)); | 159 | memset (hash, 0, sizeof (struct GNUNET_HashCode)); |
160 | *((uint32_t *) hash) = uid; | 160 | *((uint32_t *) hash) = uid; |
161 | } | 161 | } |
162 | 162 | ||
@@ -351,7 +351,7 @@ handle_message_receipt (void *cls, const struct GNUNET_MessageHeader *msg) | |||
351 | char *sender_address; | 351 | char *sender_address; |
352 | char *packed_msg; | 352 | char *packed_msg; |
353 | char *packed_msg_start; | 353 | char *packed_msg_start; |
354 | GNUNET_HashCode uidhash; | 354 | struct GNUNET_HashCode uidhash; |
355 | struct SendCallbackContext *send_ctx; | 355 | struct SendCallbackContext *send_ctx; |
356 | 356 | ||
357 | if (msg == NULL) | 357 | if (msg == NULL) |
@@ -459,7 +459,7 @@ GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle, | |||
459 | struct GNUNET_DV_SendMessage *msg; | 459 | struct GNUNET_DV_SendMessage *msg; |
460 | struct SendCallbackContext *send_ctx; | 460 | struct SendCallbackContext *send_ctx; |
461 | char *end_of_message; | 461 | char *end_of_message; |
462 | GNUNET_HashCode uidhash; | 462 | struct GNUNET_HashCode uidhash; |
463 | int msize; | 463 | int msize; |
464 | 464 | ||
465 | #if DEBUG_DV_MESSAGES | 465 | #if DEBUG_DV_MESSAGES |
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 6ee95c051..5c0b6f5fa 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -681,7 +681,7 @@ find_destination (void *cls, struct GNUNET_CONTAINER_HeapNode *node, | |||
681 | * respective neighbor. | 681 | * respective neighbor. |
682 | */ | 682 | */ |
683 | static int | 683 | static int |
684 | find_specific_id (void *cls, const GNUNET_HashCode * key, void *value) | 684 | find_specific_id (void *cls, const struct GNUNET_HashCode * key, void *value) |
685 | { | 685 | { |
686 | struct FindIDContext *fdc = cls; | 686 | struct FindIDContext *fdc = cls; |
687 | struct DistantNeighbor *dn = value; | 687 | struct DistantNeighbor *dn = value; |
@@ -704,7 +704,7 @@ find_specific_id (void *cls, const GNUNET_HashCode * key, void *value) | |||
704 | * route. | 704 | * route. |
705 | */ | 705 | */ |
706 | static int | 706 | static int |
707 | find_distant_peer (void *cls, const GNUNET_HashCode * key, void *value) | 707 | find_distant_peer (void *cls, const struct GNUNET_HashCode * key, void *value) |
708 | { | 708 | { |
709 | struct FindDestinationContext *fdc = cls; | 709 | struct FindDestinationContext *fdc = cls; |
710 | struct DistantNeighbor *distant = value; | 710 | struct DistantNeighbor *distant = value; |
@@ -1085,7 +1085,7 @@ send_message_via (const struct GNUNET_PeerIdentity *sender, | |||
1085 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop | 1085 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop |
1086 | */ | 1086 | */ |
1087 | static int | 1087 | static int |
1088 | find_least_cost_peer (void *cls, const GNUNET_HashCode * key, void *value) | 1088 | find_least_cost_peer (void *cls, const struct GNUNET_HashCode * key, void *value) |
1089 | { | 1089 | { |
1090 | struct FindLeastCostContext *find_context = cls; | 1090 | struct FindLeastCostContext *find_context = cls; |
1091 | struct DistantNeighbor *dn = value; | 1091 | struct DistantNeighbor *dn = value; |
@@ -1264,7 +1264,7 @@ struct CheckPeerContext | |||
1264 | * GNUNET_NO if not. | 1264 | * GNUNET_NO if not. |
1265 | */ | 1265 | */ |
1266 | int | 1266 | int |
1267 | checkPeerID (void *cls, const GNUNET_HashCode * key, void *value) | 1267 | checkPeerID (void *cls, const struct GNUNET_HashCode * key, void *value) |
1268 | { | 1268 | { |
1269 | struct CheckPeerContext *ctx = cls; | 1269 | struct CheckPeerContext *ctx = cls; |
1270 | struct DistantNeighbor *distant = value; | 1270 | struct DistantNeighbor *distant = value; |
@@ -1661,7 +1661,7 @@ handle_dv_data_message (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
1661 | * GNUNET_NO if not. | 1661 | * GNUNET_NO if not. |
1662 | */ | 1662 | */ |
1663 | int | 1663 | int |
1664 | print_neighbors (void *cls, const GNUNET_HashCode * key, void *abs_value) | 1664 | print_neighbors (void *cls, const struct GNUNET_HashCode * key, void *abs_value) |
1665 | { | 1665 | { |
1666 | struct DistantNeighbor *distant_neighbor = abs_value; | 1666 | struct DistantNeighbor *distant_neighbor = abs_value; |
1667 | char my_shortname[5]; | 1667 | char my_shortname[5]; |
@@ -1849,7 +1849,7 @@ handle_start (void *cls, struct GNUNET_SERVER_Client *client, | |||
1849 | * GNUNET_NO if not. | 1849 | * GNUNET_NO if not. |
1850 | */ | 1850 | */ |
1851 | int | 1851 | int |
1852 | send_iterator (void *cls, const GNUNET_HashCode * key, void *abs_value) | 1852 | send_iterator (void *cls, const struct GNUNET_HashCode * key, void *abs_value) |
1853 | { | 1853 | { |
1854 | struct DV_SendContext *send_context = cls; | 1854 | struct DV_SendContext *send_context = cls; |
1855 | struct DistantNeighbor *distant_neighbor = abs_value; | 1855 | struct DistantNeighbor *distant_neighbor = abs_value; |
@@ -2174,7 +2174,7 @@ direct_neighbor_free (struct DirectNeighbor *direct) | |||
2174 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop | 2174 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop |
2175 | */ | 2175 | */ |
2176 | static int | 2176 | static int |
2177 | schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key, | 2177 | schedule_disconnect_messages (void *cls, const struct GNUNET_HashCode * key, |
2178 | void *value) | 2178 | void *value) |
2179 | { | 2179 | { |
2180 | struct DisconnectContext *disconnect_context = cls; | 2180 | struct DisconnectContext *disconnect_context = cls; |
@@ -2222,7 +2222,7 @@ schedule_disconnect_messages (void *cls, const GNUNET_HashCode * key, | |||
2222 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop | 2222 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop |
2223 | */ | 2223 | */ |
2224 | static int | 2224 | static int |
2225 | free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | 2225 | free_extended_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value) |
2226 | { | 2226 | { |
2227 | struct DistantNeighbor *distant = value; | 2227 | struct DistantNeighbor *distant = value; |
2228 | 2228 | ||
@@ -2240,7 +2240,7 @@ free_extended_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | |||
2240 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop | 2240 | * @return GNUNET_YES to continue iteration, GNUNET_NO to stop |
2241 | */ | 2241 | */ |
2242 | static int | 2242 | static int |
2243 | free_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | 2243 | free_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value) |
2244 | { | 2244 | { |
2245 | struct DirectNeighbor *direct = value; | 2245 | struct DirectNeighbor *direct = value; |
2246 | 2246 | ||
@@ -2320,7 +2320,7 @@ core_init (void *cls, struct GNUNET_CORE_Handle *server, | |||
2320 | * GNUNET_NO if not. | 2320 | * GNUNET_NO if not. |
2321 | */ | 2321 | */ |
2322 | static int | 2322 | static int |
2323 | add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value) | 2323 | add_pkey_to_extended (void *cls, const struct GNUNET_HashCode * key, void *abs_value) |
2324 | { | 2324 | { |
2325 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls; | 2325 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pkey = cls; |
2326 | struct DistantNeighbor *distant_neighbor = abs_value; | 2326 | struct DistantNeighbor *distant_neighbor = abs_value; |
@@ -2348,7 +2348,7 @@ add_pkey_to_extended (void *cls, const GNUNET_HashCode * key, void *abs_value) | |||
2348 | * GNUNET_NO if not. | 2348 | * GNUNET_NO if not. |
2349 | */ | 2349 | */ |
2350 | static int | 2350 | static int |
2351 | update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | 2351 | update_matching_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value) |
2352 | { | 2352 | { |
2353 | struct NeighborUpdateInfo *update_info = cls; | 2353 | struct NeighborUpdateInfo *update_info = cls; |
2354 | struct DistantNeighbor *distant_neighbor = value; | 2354 | struct DistantNeighbor *distant_neighbor = value; |
@@ -2384,7 +2384,7 @@ update_matching_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | |||
2384 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise | 2384 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise |
2385 | */ | 2385 | */ |
2386 | static int | 2386 | static int |
2387 | add_distant_all_direct_neighbors (void *cls, const GNUNET_HashCode * key, | 2387 | add_distant_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, |
2388 | void *value) | 2388 | void *value) |
2389 | { | 2389 | { |
2390 | struct DirectNeighbor *direct = (struct DirectNeighbor *) value; | 2390 | struct DirectNeighbor *direct = (struct DirectNeighbor *) value; |
@@ -2837,7 +2837,7 @@ handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
2837 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise | 2837 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise |
2838 | */ | 2838 | */ |
2839 | static int | 2839 | static int |
2840 | add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value) | 2840 | add_all_extended_peers (void *cls, const struct GNUNET_HashCode * key, void *value) |
2841 | { | 2841 | { |
2842 | struct NeighborSendContext *send_context = (struct NeighborSendContext *) cls; | 2842 | struct NeighborSendContext *send_context = (struct NeighborSendContext *) cls; |
2843 | struct DistantNeighbor *distant = (struct DistantNeighbor *) value; | 2843 | struct DistantNeighbor *distant = (struct DistantNeighbor *) value; |
@@ -2875,7 +2875,7 @@ add_all_extended_peers (void *cls, const GNUNET_HashCode * key, void *value) | |||
2875 | * GNUNET_NO if not. | 2875 | * GNUNET_NO if not. |
2876 | */ | 2876 | */ |
2877 | static int | 2877 | static int |
2878 | gossip_all_to_all_iterator (void *cls, const GNUNET_HashCode * key, | 2878 | gossip_all_to_all_iterator (void *cls, const struct GNUNET_HashCode * key, |
2879 | void *abs_value) | 2879 | void *abs_value) |
2880 | { | 2880 | { |
2881 | struct DirectNeighbor *direct = abs_value; | 2881 | struct DirectNeighbor *direct = abs_value; |
@@ -2922,7 +2922,7 @@ gossip_all_to_all (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2922 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise | 2922 | * @return GNUNET_YES to continue iteration, GNUNET_NO otherwise |
2923 | */ | 2923 | */ |
2924 | static int | 2924 | static int |
2925 | add_all_direct_neighbors (void *cls, const GNUNET_HashCode * key, void *value) | 2925 | add_all_direct_neighbors (void *cls, const struct GNUNET_HashCode * key, void *value) |
2926 | { | 2926 | { |
2927 | struct DirectNeighbor *direct = (struct DirectNeighbor *) value; | 2927 | struct DirectNeighbor *direct = (struct DirectNeighbor *) value; |
2928 | struct DirectNeighbor *to = (struct DirectNeighbor *) cls; | 2928 | struct DirectNeighbor *to = (struct DirectNeighbor *) cls; |