aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-01-24 21:28:21 +0000
committerChristian Grothoff <christian@grothoff.org>2011-01-24 21:28:21 +0000
commit68c7b4ef2cbc68a810a112d865b47d3fcc4197da (patch)
treefd6a9eb9962dad7dba32c56a8281a5317ea87eee /src/fs/gnunet-service-fs.c
parent5a69a953728fd06510657fbe5f2de176b0f05f89 (diff)
downloadgnunet-68c7b4ef2cbc68a810a112d865b47d3fcc4197da.tar.gz
gnunet-68c7b4ef2cbc68a810a112d865b47d3fcc4197da.zip
asserts
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r--src/fs/gnunet-service-fs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index 66b7a5e93..80445e9bf 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -1478,6 +1478,7 @@ destroy_pending_message_list_entry (struct PendingMessageList *pml)
1478 GNUNET_CONTAINER_DLL_remove (pml->target->pending_messages_head, 1478 GNUNET_CONTAINER_DLL_remove (pml->target->pending_messages_head,
1479 pml->target->pending_messages_tail, 1479 pml->target->pending_messages_tail,
1480 pml->pm); 1480 pml->pm);
1481 GNUNET_assert (pml->target->pending_requests > 0);
1481 pml->target->pending_requests--; 1482 pml->target->pending_requests--;
1482 GNUNET_free (pml->pm); 1483 GNUNET_free (pml->pm);
1483 GNUNET_free (pml); 1484 GNUNET_free (pml);
@@ -2222,6 +2223,7 @@ transmit_to_peer (void *cls,
2222 GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head, 2223 GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head,
2223 cp->pending_messages_tail, 2224 cp->pending_messages_tail,
2224 pm); 2225 pm);
2226 GNUNET_assert (cp->pending_requests > 0);
2225 cp->pending_requests--; 2227 cp->pending_requests--;
2226 destroy_pending_message (pm, 0); 2228 destroy_pending_message (pm, 0);
2227 } 2229 }
@@ -2260,6 +2262,7 @@ transmit_to_peer (void *cls,
2260 GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head, 2262 GNUNET_CONTAINER_DLL_remove (cp->pending_messages_head,
2261 cp->pending_messages_tail, 2263 cp->pending_messages_tail,
2262 pm); 2264 pm);
2265 GNUNET_assert (cp->pending_requests > 0);
2263 cp->pending_requests--; 2266 cp->pending_requests--;
2264 } 2267 }
2265 destroy_pending_message (pm, cp->pid); 2268 destroy_pending_message (pm, cp->pid);
@@ -2675,6 +2678,11 @@ target_reservation_cb (void *cls,
2675 uint32_t bm; 2678 uint32_t bm;
2676 unsigned int i; 2679 unsigned int i;
2677 2680
2681#if DEBUG_FS
2682 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2683 "Core called back... for query `%s'.\n",
2684 GNUNET_h2s (&pr->query));
2685#endif
2678 /* (3) transmit, update ttl/priority */ 2686 /* (3) transmit, update ttl/priority */
2679 cp = GNUNET_CONTAINER_multihashmap_get (connected_peers, 2687 cp = GNUNET_CONTAINER_multihashmap_get (connected_peers,
2680 &peer->hashPubKey); 2688 &peer->hashPubKey);
@@ -3144,6 +3152,11 @@ forward_request_task (void *cls,
3144 GNUNET_assert (cp->irc == NULL); 3152 GNUNET_assert (cp->irc == NULL);
3145 pr->pirc = cp; 3153 pr->pirc = cp;
3146 cp->pr = pr; 3154 cp->pr = pr;
3155#if DEBUG_FS
3156 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3157 "Asking core for bandwidth for query `%s'.\n",
3158 GNUNET_h2s (&pr->query));
3159#endif
3147 cp->irc = GNUNET_CORE_peer_change_preference (core, 3160 cp->irc = GNUNET_CORE_peer_change_preference (core,
3148 &psc.target, 3161 &psc.target,
3149 GNUNET_CONSTANTS_SERVICE_TIMEOUT, 3162 GNUNET_CONSTANTS_SERVICE_TIMEOUT,