diff options
author | Julius Bünger <buenger@mytum.de> | 2018-12-10 17:58:57 +0100 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-12-13 15:52:53 +0100 |
commit | 37f806bedb12e20a6ccdd87df7fa28d4b4ad041e (patch) | |
tree | 3c4fb6896d94505c0fd2e99d07c0477c16567300 | |
parent | 620b0f300cefba602e1c1532ae5817d20277abb8 (diff) | |
download | gnunet-37f806bedb12e20a6ccdd87df7fa28d4b4ad041e.tar.gz gnunet-37f806bedb12e20a6ccdd87df7fa28d4b4ad041e.zip |
RPS service: Assure map with exists before using
-rw-r--r-- | src/rps/gnunet-service-rps.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 10ab1c10a..0c333c4f1 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -3499,7 +3499,8 @@ handle_peer_pull_request (void *cls, | |||
3499 | "# pull request message received", | 3499 | "# pull request message received", |
3500 | 1, | 3500 | 1, |
3501 | GNUNET_NO); | 3501 | GNUNET_NO); |
3502 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | 3502 | if (NULL != map_single_hop && |
3503 | GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | ||
3503 | &peer_ctx->peer_id)) | 3504 | &peer_ctx->peer_id)) |
3504 | { | 3505 | { |
3505 | GNUNET_STATISTICS_update (stats, | 3506 | GNUNET_STATISTICS_update (stats, |
@@ -3770,7 +3771,8 @@ send_pull_request (struct PeerContext *peer_ctx) | |||
3770 | "# pull request send issued", | 3771 | "# pull request send issued", |
3771 | 1, | 3772 | 1, |
3772 | GNUNET_NO); | 3773 | GNUNET_NO); |
3773 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | 3774 | if (NULL != map_single_hop && |
3775 | GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop, | ||
3774 | &peer_ctx->peer_id)) | 3776 | &peer_ctx->peer_id)) |
3775 | { | 3777 | { |
3776 | GNUNET_STATISTICS_update (stats, | 3778 | GNUNET_STATISTICS_update (stats, |