diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-21 09:50:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-21 09:50:14 +0000 |
commit | 71dfeaa025d162af18707ee92cee1d1121d3f523 (patch) | |
tree | 430a12d6ce151efe7d2c7878fd0141e68552d8b2 /src | |
parent | b1e1d922a582ba7de1cbfde33c2961eb9b03ecc6 (diff) |
-adding a few extra checks for #3615
Diffstat (limited to 'src')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 1 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_push.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index d866a003af..708308f7f6 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c @@ -611,6 +611,7 @@ peer_respect_cb (void *cls, { struct GSF_ConnectedPeer *cp = cls; + GNUNET_assert (NULL != cp->respect_iterate_req); cp->respect_iterate_req = NULL; if ((NULL != record) && (sizeof (cp->disk_respect) == record->value_size)) cp->disk_respect = cp->ppd.respect = *((uint32_t *)record->value); diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c index fcd4c832fb..d1bdad1d50 100644 --- a/src/fs/gnunet-service-fs_push.c +++ b/src/fs/gnunet-service-fs_push.c @@ -606,6 +606,15 @@ GSF_push_start_ (struct GSF_ConnectedPeer *peer) if (GNUNET_YES != enabled) return; + for (mrp = peer_head; NULL != mrp; mrp = mrp->next) + if (mrp->peer == peer) + break; + if (NULL != mrp) + { + GNUNET_break (0); + return; + } + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding peer %s to list for pushing\n", GNUNET_i2s (GSF_connected_peer_get_identity2_(peer))); |