diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-06-17 20:28:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-06-17 20:28:00 +0000 |
commit | 135ec26aa7c37786e2dfa1d6dc99f9ea407cdb30 (patch) | |
tree | ebe43de32aa35ee6c4f9a4551fa082c68d9cf599 /src/fs/gnunet-service-fs_cp.c | |
parent | 48331b7ce205002b7dc7e4c1809fd6c1863f758c (diff) | |
download | gnunet-135ec26aa7c37786e2dfa1d6dc99f9ea407cdb30.tar.gz gnunet-135ec26aa7c37786e2dfa1d6dc99f9ea407cdb30.zip |
checks
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 350ee54f1..56129273c 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -1189,6 +1189,7 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1189 | enum GNUNET_BLOCK_Type type; | 1189 | enum GNUNET_BLOCK_Type type; |
1190 | GNUNET_PEER_Id spid; | 1190 | GNUNET_PEER_Id spid; |
1191 | 1191 | ||
1192 | GNUNET_assert (other != NULL); | ||
1192 | msize = ntohs(message->size); | 1193 | msize = ntohs(message->size); |
1193 | if (msize < sizeof (struct GetMessage)) | 1194 | if (msize < sizeof (struct GetMessage)) |
1194 | { | 1195 | { |
@@ -1299,13 +1300,14 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1299 | spid = 0; | 1300 | spid = 0; |
1300 | if ( (GNUNET_LOAD_get_load (cp->ppd.transmission_delay) > 3 * (1 + priority)) || | 1301 | if ( (GNUNET_LOAD_get_load (cp->ppd.transmission_delay) > 3 * (1 + priority)) || |
1301 | (GNUNET_LOAD_get_average (cp->ppd.transmission_delay) > | 1302 | (GNUNET_LOAD_get_average (cp->ppd.transmission_delay) > |
1302 | GNUNET_CONSTANTS_MAX_CORK_DELAY.rel_value * 2 + GNUNET_LOAD_get_average (GSF_rt_entry_lifetime)) ) | 1303 | GNUNET_CONSTANTS_MAX_CORK_DELAY.rel_value * 2 + GNUNET_LOAD_get_average (GSF_rt_entry_lifetime)) ) |
1303 | { | 1304 | { |
1304 | /* don't have BW to send to peer, or would likely take longer than we have for it, | 1305 | /* don't have BW to send to peer, or would likely take longer than we have for it, |
1305 | so at best indirect the query */ | 1306 | so at best indirect the query */ |
1306 | priority = 0; | 1307 | priority = 0; |
1307 | options |= GSF_PRO_FORWARD_ONLY; | 1308 | options |= GSF_PRO_FORWARD_ONLY; |
1308 | spid = GNUNET_PEER_intern (other); | 1309 | spid = GNUNET_PEER_intern (other); |
1310 | GNUNET_assert (0 != spid); | ||
1309 | } | 1311 | } |
1310 | ttl = bound_ttl (ntohl (gm->ttl), priority); | 1312 | ttl = bound_ttl (ntohl (gm->ttl), priority); |
1311 | /* decrement ttl (always) */ | 1313 | /* decrement ttl (always) */ |