From: Christian Grothoff Date: Fri, 16 Apr 2010 15:15:04 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~22137 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0bbb1957c9ad0e6dedf550fe640b8fc923180161;p=oweals%2Fgnunet.git fix --- diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 3affb5807..67c0cacd4 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -1502,8 +1502,12 @@ target_peer_select_cb (void *cls, double score; unsigned int i; unsigned int pc; - - /* 1) check if we have already (recently) forwarded to this peer */ + + /* 1) check that this peer is not the initiator */ + if (cp == pr->cp) + return GNUNET_YES; /* skip */ + + /* 2) check if we have already (recently) forwarded to this peer */ pc = 0; for (i=0;iused_pids_off;i++) if (pr->used_pids[i] == cp->pid) @@ -1526,7 +1530,7 @@ target_peer_select_cb (void *cls, "Re-trying query that was previously transmitted %u times to this peer\n", (unsigned int) pc); #endif - // 2) calculate how much we'd like to forward to this peer + // 3) calculate how much we'd like to forward to this peer score = 42; // FIXME! // FIXME: also need API to gather data on responsiveness // of this peer (we have fields for that in 'cp', but