diff options
author | Julius Bünger <buenger@mytum.de> | 2018-08-24 10:48:34 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-08-24 10:48:34 +0200 |
commit | ccd23df541fac1192f492b0169cb87f0f23a726d (patch) | |
tree | 2c82fac4a3ebf93ad3f4c5b20af4d3a1a0f3195e /src/rps/gnunet-service-rps.c | |
parent | d8c24ef01b45a28d563bd96a6d1ee35d73fa1df7 (diff) | |
download | gnunet-ccd23df541fac1192f492b0169cb87f0f23a726d.tar.gz gnunet-ccd23df541fac1192f492b0169cb87f0f23a726d.zip |
Fix: Cast closure to proper type
Diffstat (limited to 'src/rps/gnunet-service-rps.c')
-rw-r--r-- | src/rps/gnunet-service-rps.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 5d0e60508..5ed35e538 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c | |||
@@ -3094,7 +3094,8 @@ static int | |||
3094 | check_peer_pull_reply (void *cls, | 3094 | check_peer_pull_reply (void *cls, |
3095 | const struct GNUNET_RPS_P2P_PullReplyMessage *msg) | 3095 | const struct GNUNET_RPS_P2P_PullReplyMessage *msg) |
3096 | { | 3096 | { |
3097 | struct GNUNET_PeerIdentity *sender = cls; | 3097 | struct ChannelCtx *channel_ctx = cls; |
3098 | struct PeerContext *sender_ctx = channel_ctx->peer_ctx; | ||
3098 | 3099 | ||
3099 | if (sizeof (struct GNUNET_RPS_P2P_PullReplyMessage) > ntohs (msg->header.size)) | 3100 | if (sizeof (struct GNUNET_RPS_P2P_PullReplyMessage) > ntohs (msg->header.size)) |
3100 | { | 3101 | { |
@@ -3114,11 +3115,12 @@ check_peer_pull_reply (void *cls, | |||
3114 | return GNUNET_SYSERR; | 3115 | return GNUNET_SYSERR; |
3115 | } | 3116 | } |
3116 | 3117 | ||
3117 | if (GNUNET_YES != check_peer_flag (sender, Peers_PULL_REPLY_PENDING)) | 3118 | if (GNUNET_YES != check_peer_flag (&sender_ctx->peer_id, |
3119 | Peers_PULL_REPLY_PENDING)) | ||
3118 | { | 3120 | { |
3119 | LOG (GNUNET_ERROR_TYPE_WARNING, | 3121 | LOG (GNUNET_ERROR_TYPE_WARNING, |
3120 | "Received a pull reply from a peer (%s) we didn't request one from!\n", | 3122 | "Received a pull reply from a peer (%s) we didn't request one from!\n", |
3121 | GNUNET_i2s (sender)); | 3123 | GNUNET_i2s (&sender_ctx->peer_id)); |
3122 | GNUNET_STATISTICS_update (stats, | 3124 | GNUNET_STATISTICS_update (stats, |
3123 | "# unrequested pull replies", | 3125 | "# unrequested pull replies", |
3124 | 1, | 3126 | 1, |