diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-26 14:02:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-26 14:02:09 +0000 |
commit | a9763a49d78b240fed1ace9068a0ea11cdff00f7 (patch) | |
tree | 292f58cc3a0765c58952cd83c695e1faafc83fd9 /src/fs/gnunet-service-fs_cp.c | |
parent | 69685227863090eb24ee20d07e8c0f139264c061 (diff) | |
download | gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.tar.gz gnunet-a9763a49d78b240fed1ace9068a0ea11cdff00f7.zip |
-eliminating #if DEBUG checks
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 86986b899..e84993bd3 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -912,11 +912,9 @@ handle_p2p_reply (void *cls, enum GNUNET_BLOCK_EvaluationResult eval, | |||
912 | 1, GNUNET_NO); | 912 | 1, GNUNET_NO); |
913 | return; | 913 | return; |
914 | } | 914 | } |
915 | #if DEBUG_FS | ||
916 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 915 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
917 | "Transmitting result for query `%s' to peer\n", | 916 | "Transmitting result for query `%s' to peer\n", |
918 | GNUNET_h2s (&prd->query)); | 917 | GNUNET_h2s (&prd->query)); |
919 | #endif | ||
920 | GNUNET_STATISTICS_update (GSF_stats, | 918 | GNUNET_STATISTICS_update (GSF_stats, |
921 | gettext_noop ("# replies received for other peers"), | 919 | gettext_noop ("# replies received for other peers"), |
922 | 1, GNUNET_NO); | 920 | 1, GNUNET_NO); |
@@ -1194,7 +1192,6 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1194 | cp = cps; | 1192 | cp = cps; |
1195 | if (cp == NULL) | 1193 | if (cp == NULL) |
1196 | { | 1194 | { |
1197 | #if DEBUG_FS | ||
1198 | if (0 != (bm & GET_MESSAGE_BIT_RETURN_TO)) | 1195 | if (0 != (bm & GET_MESSAGE_BIT_RETURN_TO)) |
1199 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1196 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1200 | "Failed to find RETURN-TO peer `%4s' in connection set. Dropping query.\n", | 1197 | "Failed to find RETURN-TO peer `%4s' in connection set. Dropping query.\n", |
@@ -1205,7 +1202,6 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1202 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1206 | "Failed to find peer `%4s' in connection set. Dropping query.\n", | 1203 | "Failed to find peer `%4s' in connection set. Dropping query.\n", |
1207 | GNUNET_i2s (other)); | 1204 | GNUNET_i2s (other)); |
1208 | #endif | ||
1209 | GNUNET_STATISTICS_update (GSF_stats, | 1205 | GNUNET_STATISTICS_update (GSF_stats, |
1210 | gettext_noop | 1206 | gettext_noop |
1211 | ("# requests dropped due to missing reverse route"), | 1207 | ("# requests dropped due to missing reverse route"), |
@@ -1218,19 +1214,15 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1218 | priority = bound_priority (ntohl (gm->priority), cps); | 1214 | priority = bound_priority (ntohl (gm->priority), cps); |
1219 | if (priority < 0) | 1215 | if (priority < 0) |
1220 | { | 1216 | { |
1221 | #if DEBUG_FS | ||
1222 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1217 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1223 | "Dropping query from `%s', this peer is too busy.\n", | 1218 | "Dropping query from `%s', this peer is too busy.\n", |
1224 | GNUNET_i2s (other)); | 1219 | GNUNET_i2s (other)); |
1225 | #endif | ||
1226 | return NULL; | 1220 | return NULL; |
1227 | } | 1221 | } |
1228 | #if DEBUG_FS | ||
1229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1222 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1230 | "Received request for `%s' of type %u from peer `%4s' with flags %u\n", | 1223 | "Received request for `%s' of type %u from peer `%4s' with flags %u\n", |
1231 | GNUNET_h2s (&gm->query), (unsigned int) type, GNUNET_i2s (other), | 1224 | GNUNET_h2s (&gm->query), (unsigned int) type, GNUNET_i2s (other), |
1232 | (unsigned int) bm); | 1225 | (unsigned int) bm); |
1233 | #endif | ||
1234 | namespace = (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE)) ? &opt[bits++] : NULL; | 1226 | namespace = (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE)) ? &opt[bits++] : NULL; |
1235 | if ((type == GNUNET_BLOCK_TYPE_FS_SBLOCK) && (namespace == NULL)) | 1227 | if ((type == GNUNET_BLOCK_TYPE_FS_SBLOCK) && (namespace == NULL)) |
1236 | { | 1228 | { |
@@ -1267,11 +1259,9 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1267 | TTL_DECREMENT); | 1259 | TTL_DECREMENT); |
1268 | if ((ttl < 0) && (((int32_t) (ttl - ttl_decrement)) > 0)) | 1260 | if ((ttl < 0) && (((int32_t) (ttl - ttl_decrement)) > 0)) |
1269 | { | 1261 | { |
1270 | #if DEBUG_FS | ||
1271 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1262 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1272 | "Dropping query from `%s' due to TTL underflow (%d - %u).\n", | 1263 | "Dropping query from `%s' due to TTL underflow (%d - %u).\n", |
1273 | GNUNET_i2s (other), ttl, ttl_decrement); | 1264 | GNUNET_i2s (other), ttl, ttl_decrement); |
1274 | #endif | ||
1275 | GNUNET_STATISTICS_update (GSF_stats, | 1265 | GNUNET_STATISTICS_update (GSF_stats, |
1276 | gettext_noop | 1266 | gettext_noop |
1277 | ("# requests dropped due TTL underflow"), 1, | 1267 | ("# requests dropped due TTL underflow"), 1, |
@@ -1295,11 +1285,9 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other, | |||
1295 | { | 1285 | { |
1296 | /* existing request has higher TTL, drop new one! */ | 1286 | /* existing request has higher TTL, drop new one! */ |
1297 | prd->priority += priority; | 1287 | prd->priority += priority; |
1298 | #if DEBUG_FS | ||
1299 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1288 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1300 | "Have existing request with higher TTL, dropping new request.\n", | 1289 | "Have existing request with higher TTL, dropping new request.\n", |
1301 | GNUNET_i2s (other)); | 1290 | GNUNET_i2s (other)); |
1302 | #endif | ||
1303 | GNUNET_STATISTICS_update (GSF_stats, | 1291 | GNUNET_STATISTICS_update (GSF_stats, |
1304 | gettext_noop | 1292 | gettext_noop |
1305 | ("# requests dropped due to higher-TTL request"), | 1293 | ("# requests dropped due to higher-TTL request"), |
@@ -1352,10 +1340,8 @@ peer_transmit_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1352 | struct GSF_PeerTransmitHandle *pth = cls; | 1340 | struct GSF_PeerTransmitHandle *pth = cls; |
1353 | struct GSF_ConnectedPeer *cp; | 1341 | struct GSF_ConnectedPeer *cp; |
1354 | 1342 | ||
1355 | #if DEBUG_FS | ||
1356 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1343 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1357 | "Timeout trying to transmit to other peer\n"); | 1344 | "Timeout trying to transmit to other peer\n"); |
1358 | #endif | ||
1359 | pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1345 | pth->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
1360 | cp = pth->cp; | 1346 | cp = pth->cp; |
1361 | GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); | 1347 | GNUNET_CONTAINER_DLL_remove (cp->pth_head, cp->pth_tail, pth); |
@@ -1717,19 +1703,15 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
1717 | { | 1703 | { |
1718 | if (cp->last_migration_block.abs_value > block_time.abs_value) | 1704 | if (cp->last_migration_block.abs_value > block_time.abs_value) |
1719 | { | 1705 | { |
1720 | #if DEBUG_FS | ||
1721 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1706 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1722 | "Migration already blocked for another %llu ms\n", | 1707 | "Migration already blocked for another %llu ms\n", |
1723 | (unsigned long long) | 1708 | (unsigned long long) |
1724 | GNUNET_TIME_absolute_get_remaining | 1709 | GNUNET_TIME_absolute_get_remaining |
1725 | (cp->last_migration_block).rel_value); | 1710 | (cp->last_migration_block).rel_value); |
1726 | #endif | ||
1727 | return; /* already blocked */ | 1711 | return; /* already blocked */ |
1728 | } | 1712 | } |
1729 | #if DEBUG_FS | ||
1730 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %llu ms\n", | 1713 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Asking to stop migration for %llu ms\n", |
1731 | (unsigned long long) GNUNET_TIME_absolute_get_remaining (block_time).rel_value); | 1714 | (unsigned long long) GNUNET_TIME_absolute_get_remaining (block_time).rel_value); |
1732 | #endif | ||
1733 | cp->last_migration_block = block_time; | 1715 | cp->last_migration_block = block_time; |
1734 | if (cp->migration_pth != NULL) | 1716 | if (cp->migration_pth != NULL) |
1735 | GSF_peer_transmit_cancel_ (cp->migration_pth); | 1717 | GSF_peer_transmit_cancel_ (cp->migration_pth); |