aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-06-17 17:36:34 +0000
committerChristian Grothoff <christian@grothoff.org>2011-06-17 17:36:34 +0000
commit3ba0cb4a0578412f7ca371eae7f3941037db7b0c (patch)
tree431e98f0ab2c9900aab10e58965f1c4f384043c9 /src/fs
parent48e69fe1cea624af0a54148cfcc802b35782cf51 (diff)
downloadgnunet-3ba0cb4a0578412f7ca371eae7f3941037db7b0c.tar.gz
gnunet-3ba0cb4a0578412f7ca371eae7f3941037db7b0c.zip
fixing typo, possibly over-eager disconnect
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-service-fs_cp.c3
-rw-r--r--src/fs/gnunet-service-fs_pr.c7
-rw-r--r--src/fs/gnunet-service-fs_push.c1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 6a4c46862..350ee54f1 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -430,6 +430,7 @@ schedule_transmission (struct GSF_PeerTransmitHandle *pth)
430 (0 != pth->cth_in_progress) ) 430 (0 != pth->cth_in_progress) )
431 return; /* already done */ 431 return; /* already done */
432 cp = pth->cp; 432 cp = pth->cp;
433 GNUNET_assert (0 != cp->ppd.pid);
433 GNUNET_PEER_resolve (cp->ppd.pid, 434 GNUNET_PEER_resolve (cp->ppd.pid,
434 &target); 435 &target);
435 if ( (GNUNET_YES == pth->is_query) && 436 if ( (GNUNET_YES == pth->is_query) &&
@@ -1789,6 +1790,7 @@ void
1789GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, 1790GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
1790 struct GNUNET_PeerIdentity *id) 1791 struct GNUNET_PeerIdentity *id)
1791{ 1792{
1793 GNUNET_assert (0 != cp->ppd.pid);
1792 GNUNET_PEER_resolve (cp->ppd.pid, 1794 GNUNET_PEER_resolve (cp->ppd.pid,
1793 id); 1795 id);
1794} 1796}
@@ -1882,6 +1884,7 @@ flush_trust (void *cls,
1882 1884
1883 if (cp->ppd.trust == cp->disk_trust) 1885 if (cp->ppd.trust == cp->disk_trust)
1884 return GNUNET_OK; /* unchanged */ 1886 return GNUNET_OK; /* unchanged */
1887 GNUNET_assert (0 != cp->ppd.pid);
1885 GNUNET_PEER_resolve (cp->ppd.pid, 1888 GNUNET_PEER_resolve (cp->ppd.pid,
1886 &pid); 1889 &pid);
1887 fn = get_trust_filename (&pid); 1890 fn = get_trust_filename (&pid);
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index c70479b22..e17d778db 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -503,6 +503,11 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
503 k = 0; 503 k = 0;
504 bm = 0; 504 bm = 0;
505 do_route = (0 == (pr->public_data.options & GSF_PRO_FORWARD_ONLY)); 505 do_route = (0 == (pr->public_data.options & GSF_PRO_FORWARD_ONLY));
506 if ( (do_route) && (pr->sender_pid == 0))
507 {
508 GNUNET_break (0);
509 do_route = GNUNET_NO;
510 }
506 if (! do_route) 511 if (! do_route)
507 { 512 {
508 bm |= GET_MESSAGE_BIT_RETURN_TO; 513 bm |= GET_MESSAGE_BIT_RETURN_TO;
@@ -1055,6 +1060,7 @@ GSF_dht_lookup_ (struct GSF_PendingRequest *pr)
1055 } 1060 }
1056 if (0 != (pr->public_data.options & GSF_PRO_FORWARD_ONLY)) 1061 if (0 != (pr->public_data.options & GSF_PRO_FORWARD_ONLY))
1057 { 1062 {
1063 GNUNET_assert (0 != pr->sender_pid);
1058 GNUNET_PEER_resolve (pr->sender_pid, 1064 GNUNET_PEER_resolve (pr->sender_pid,
1059 &pi); 1065 &pi);
1060 memcpy (&buf[xquery_size], &pi, sizeof (struct GNUNET_PeerIdentity)); 1066 memcpy (&buf[xquery_size], &pi, sizeof (struct GNUNET_PeerIdentity));
@@ -1531,6 +1537,7 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
1531 pmc = GNUNET_malloc (sizeof (struct PutMigrationContext)); 1537 pmc = GNUNET_malloc (sizeof (struct PutMigrationContext));
1532 pmc->start = GNUNET_TIME_absolute_get (); 1538 pmc->start = GNUNET_TIME_absolute_get ();
1533 pmc->requested = prq.request_found; 1539 pmc->requested = prq.request_found;
1540 GNUNET_assert (0 != GSF_get_peer_performance_data_ (cp)->pid);
1534 GNUNET_PEER_resolve (GSF_get_peer_performance_data_ (cp)->pid, 1541 GNUNET_PEER_resolve (GSF_get_peer_performance_data_ (cp)->pid,
1535 &pmc->origin); 1542 &pmc->origin);
1536 if (NULL == 1543 if (NULL ==
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index c3affeff4..099010758 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -345,6 +345,7 @@ score_content (struct MigrationReadyPeer *peer,
345 for (i=0;i<MIGRATION_LIST_SIZE;i++) 345 for (i=0;i<MIGRATION_LIST_SIZE;i++)
346 if (block->target_list[i] == ppd->pid) 346 if (block->target_list[i] == ppd->pid)
347 return -1; 347 return -1;
348 GNUNET_assert (0 != ppd->pid);
348 GNUNET_PEER_resolve (ppd->pid, 349 GNUNET_PEER_resolve (ppd->pid,
349 &id); 350 &id);
350 dist = GNUNET_CRYPTO_hash_distance_u32 (&block->query, 351 dist = GNUNET_CRYPTO_hash_distance_u32 (&block->query,