diff options
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index e389a24b2..f38a32c81 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -1143,7 +1143,6 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1143 | struct GSF_PendingRequestData *prd; | 1143 | struct GSF_PendingRequestData *prd; |
1144 | struct GSF_ConnectedPeer *cp; | 1144 | struct GSF_ConnectedPeer *cp; |
1145 | struct GSF_ConnectedPeer *cps; | 1145 | struct GSF_ConnectedPeer *cps; |
1146 | const struct GNUNET_HashCode *namespace; | ||
1147 | const struct GNUNET_PeerIdentity *target; | 1146 | const struct GNUNET_PeerIdentity *target; |
1148 | enum GSF_PendingRequestOptions options; | 1147 | enum GSF_PendingRequestOptions options; |
1149 | uint16_t msize; | 1148 | uint16_t msize; |
@@ -1244,17 +1243,6 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1244 | "Received request for `%s' of type %u from peer `%4s' with flags %u\n", | 1243 | "Received request for `%s' of type %u from peer `%4s' with flags %u\n", |
1245 | GNUNET_h2s (&gm->query), (unsigned int) type, GNUNET_i2s (other), | 1244 | GNUNET_h2s (&gm->query), (unsigned int) type, GNUNET_i2s (other), |
1246 | (unsigned int) bm); | 1245 | (unsigned int) bm); |
1247 | namespace = (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE)) ? &opt[bits++] : NULL; | ||
1248 | if ((GNUNET_BLOCK_TYPE_FS_SBLOCK == type) && (NULL == namespace)) | ||
1249 | { | ||
1250 | GNUNET_break_op (0); | ||
1251 | return NULL; | ||
1252 | } | ||
1253 | if ((GNUNET_BLOCK_TYPE_FS_SBLOCK != type) && (NULL != namespace)) | ||
1254 | { | ||
1255 | GNUNET_break_op (0); | ||
1256 | return NULL; | ||
1257 | } | ||
1258 | target = | 1246 | target = |
1259 | (0 != | 1247 | (0 != |
1260 | (bm & GET_MESSAGE_BIT_TRANSMIT_TO)) ? ((const struct GNUNET_PeerIdentity | 1248 | (bm & GET_MESSAGE_BIT_TRANSMIT_TO)) ? ((const struct GNUNET_PeerIdentity |
@@ -1298,9 +1286,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1298 | { | 1286 | { |
1299 | pr = peerreq->pr; | 1287 | pr = peerreq->pr; |
1300 | prd = GSF_pending_request_get_data_ (pr); | 1288 | prd = GSF_pending_request_get_data_ (pr); |
1301 | if ((prd->type == type) && | 1289 | if (prd->type == type) |
1302 | ((type != GNUNET_BLOCK_TYPE_FS_SBLOCK) || | ||
1303 | (0 == memcmp (&prd->namespace, namespace, sizeof (struct GNUNET_HashCode))))) | ||
1304 | { | 1290 | { |
1305 | if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl) | 1291 | if (prd->ttl.abs_value >= GNUNET_TIME_absolute_get ().abs_value + ttl) |
1306 | { | 1292 | { |
@@ -1324,7 +1310,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1324 | 1310 | ||
1325 | peerreq = GNUNET_malloc (sizeof (struct PeerRequest)); | 1311 | peerreq = GNUNET_malloc (sizeof (struct PeerRequest)); |
1326 | peerreq->cp = cp; | 1312 | peerreq->cp = cp; |
1327 | pr = GSF_pending_request_create_ (options, type, &gm->query, namespace, | 1313 | pr = GSF_pending_request_create_ (options, type, &gm->query, |
1328 | target, | 1314 | target, |
1329 | (bfsize > | 1315 | (bfsize > |
1330 | 0) ? (const char *) &opt[bits] : NULL, | 1316 | 0) ? (const char *) &opt[bits] : NULL, |