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/fs/gnunet-service-fs_cp.c | |
parent | 16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff) | |
download | gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.tar.gz gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.zip |
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 9c229251d..e021606a9 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -759,7 +759,7 @@ copy_reply (void *cls, size_t buf_size, void *buf) | |||
759 | */ | 759 | */ |
760 | static void | 760 | static void |
761 | free_pending_request (struct PeerRequest *peerreq, | 761 | free_pending_request (struct PeerRequest *peerreq, |
762 | const GNUNET_HashCode *query) | 762 | const struct GNUNET_HashCode *query) |
763 | { | 763 | { |
764 | struct GSF_ConnectedPeer *cp = peerreq->cp; | 764 | struct GSF_ConnectedPeer *cp = peerreq->cp; |
765 | 765 | ||
@@ -786,7 +786,7 @@ free_pending_request (struct PeerRequest *peerreq, | |||
786 | * @return GNUNET_YES (continue to iterate) | 786 | * @return GNUNET_YES (continue to iterate) |
787 | */ | 787 | */ |
788 | static int | 788 | static int |
789 | cancel_pending_request (void *cls, const GNUNET_HashCode * query, void *value) | 789 | cancel_pending_request (void *cls, const struct GNUNET_HashCode * query, void *value) |
790 | { | 790 | { |
791 | struct PeerRequest *peerreq = value; | 791 | struct PeerRequest *peerreq = value; |
792 | struct GSF_PendingRequest *pr = peerreq->pr; | 792 | struct GSF_PendingRequest *pr = peerreq->pr; |
@@ -1129,13 +1129,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1129 | struct GSF_PendingRequestData *prd; | 1129 | struct GSF_PendingRequestData *prd; |
1130 | struct GSF_ConnectedPeer *cp; | 1130 | struct GSF_ConnectedPeer *cp; |
1131 | struct GSF_ConnectedPeer *cps; | 1131 | struct GSF_ConnectedPeer *cps; |
1132 | const GNUNET_HashCode *namespace; | 1132 | const struct GNUNET_HashCode *namespace; |
1133 | const struct GNUNET_PeerIdentity *target; | 1133 | const struct GNUNET_PeerIdentity *target; |
1134 | enum GSF_PendingRequestOptions options; | 1134 | enum GSF_PendingRequestOptions options; |
1135 | uint16_t msize; | 1135 | uint16_t msize; |
1136 | const struct GetMessage *gm; | 1136 | const struct GetMessage *gm; |
1137 | unsigned int bits; | 1137 | unsigned int bits; |
1138 | const GNUNET_HashCode *opt; | 1138 | const struct GNUNET_HashCode *opt; |
1139 | uint32_t bm; | 1139 | uint32_t bm; |
1140 | size_t bfsize; | 1140 | size_t bfsize; |
1141 | uint32_t ttl_decrement; | 1141 | uint32_t ttl_decrement; |
@@ -1165,13 +1165,13 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1165 | bits++; | 1165 | bits++; |
1166 | bm >>= 1; | 1166 | bm >>= 1; |
1167 | } | 1167 | } |
1168 | if (msize < sizeof (struct GetMessage) + bits * sizeof (GNUNET_HashCode)) | 1168 | if (msize < sizeof (struct GetMessage) + bits * sizeof (struct GNUNET_HashCode)) |
1169 | { | 1169 | { |
1170 | GNUNET_break_op (0); | 1170 | GNUNET_break_op (0); |
1171 | return NULL; | 1171 | return NULL; |
1172 | } | 1172 | } |
1173 | opt = (const GNUNET_HashCode *) &gm[1]; | 1173 | opt = (const struct GNUNET_HashCode *) &gm[1]; |
1174 | bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (GNUNET_HashCode); | 1174 | bfsize = msize - sizeof (struct GetMessage) - bits * sizeof (struct GNUNET_HashCode); |
1175 | /* bfsize must be power of 2, check! */ | 1175 | /* bfsize must be power of 2, check! */ |
1176 | if (0 != ((bfsize - 1) & bfsize)) | 1176 | if (0 != ((bfsize - 1) & bfsize)) |
1177 | { | 1177 | { |
@@ -1284,7 +1284,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1284 | prd = GSF_pending_request_get_data_ (pr); | 1284 | prd = GSF_pending_request_get_data_ (pr); |
1285 | if ((prd->type == type) && | 1285 | if ((prd->type == type) && |
1286 | ((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) || | 1286 | ((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) || |
1287 | (0 == memcmp (&prd->namespace, namespace, sizeof (GNUNET_HashCode))))) | 1287 | (0 == memcmp (&prd->namespace, namespace, sizeof (struct GNUNET_HashCode))))) |
1288 | { | 1288 | { |
1289 | if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl) | 1289 | if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl) |
1290 | { | 1290 | { |
@@ -1612,7 +1612,7 @@ struct IterationContext | |||
1612 | * @return GNUNET_YES to continue iteration | 1612 | * @return GNUNET_YES to continue iteration |
1613 | */ | 1613 | */ |
1614 | static int | 1614 | static int |
1615 | call_iterator (void *cls, const GNUNET_HashCode * key, void *value) | 1615 | call_iterator (void *cls, const struct GNUNET_HashCode * key, void *value) |
1616 | { | 1616 | { |
1617 | struct IterationContext *ic = cls; | 1617 | struct IterationContext *ic = cls; |
1618 | struct GSF_ConnectedPeer *cp = value; | 1618 | struct GSF_ConnectedPeer *cp = value; |
@@ -1728,7 +1728,7 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
1728 | * @return GNUNET_OK to continue iteration | 1728 | * @return GNUNET_OK to continue iteration |
1729 | */ | 1729 | */ |
1730 | static int | 1730 | static int |
1731 | flush_trust (void *cls, const GNUNET_HashCode * key, void *value) | 1731 | flush_trust (void *cls, const struct GNUNET_HashCode * key, void *value) |
1732 | { | 1732 | { |
1733 | struct GSF_ConnectedPeer *cp = value; | 1733 | struct GSF_ConnectedPeer *cp = value; |
1734 | char *fn; | 1734 | char *fn; |
@@ -1829,7 +1829,7 @@ GSF_connected_peer_init_ () | |||
1829 | * @return GNUNET_YES (we should continue to iterate) | 1829 | * @return GNUNET_YES (we should continue to iterate) |
1830 | */ | 1830 | */ |
1831 | static int | 1831 | static int |
1832 | clean_peer (void *cls, const GNUNET_HashCode * key, void *value) | 1832 | clean_peer (void *cls, const struct GNUNET_HashCode * key, void *value) |
1833 | { | 1833 | { |
1834 | GSF_peer_disconnect_handler_ (NULL, (const struct GNUNET_PeerIdentity *) key); | 1834 | GSF_peer_disconnect_handler_ (NULL, (const struct GNUNET_PeerIdentity *) key); |
1835 | return GNUNET_YES; | 1835 | return GNUNET_YES; |
@@ -1862,7 +1862,7 @@ GSF_connected_peer_done_ () | |||
1862 | * @return GNUNET_YES (we should continue to iterate) | 1862 | * @return GNUNET_YES (we should continue to iterate) |
1863 | */ | 1863 | */ |
1864 | static int | 1864 | static int |
1865 | clean_local_client (void *cls, const GNUNET_HashCode * key, void *value) | 1865 | clean_local_client (void *cls, const struct GNUNET_HashCode * key, void *value) |
1866 | { | 1866 | { |
1867 | const struct GSF_LocalClient *lc = cls; | 1867 | const struct GSF_LocalClient *lc = cls; |
1868 | struct GSF_ConnectedPeer *cp = value; | 1868 | struct GSF_ConnectedPeer *cp = value; |