From: Julius Bünger Date: Fri, 24 Aug 2018 08:48:34 +0000 (+0200) Subject: Fix: Cast closure to proper type X-Git-Tag: v0.11.0~278 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ccd23df541fac1192f492b0169cb87f0f23a726d;p=oweals%2Fgnunet.git Fix: Cast closure to proper type --- 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 check_peer_pull_reply (void *cls, const struct GNUNET_RPS_P2P_PullReplyMessage *msg) { - struct GNUNET_PeerIdentity *sender = cls; + struct ChannelCtx *channel_ctx = cls; + struct PeerContext *sender_ctx = channel_ctx->peer_ctx; if (sizeof (struct GNUNET_RPS_P2P_PullReplyMessage) > ntohs (msg->header.size)) { @@ -3114,11 +3115,12 @@ check_peer_pull_reply (void *cls, return GNUNET_SYSERR; } - if (GNUNET_YES != check_peer_flag (sender, Peers_PULL_REPLY_PENDING)) + if (GNUNET_YES != check_peer_flag (&sender_ctx->peer_id, + Peers_PULL_REPLY_PENDING)) { LOG (GNUNET_ERROR_TYPE_WARNING, "Received a pull reply from a peer (%s) we didn't request one from!\n", - GNUNET_i2s (sender)); + GNUNET_i2s (&sender_ctx->peer_id)); GNUNET_STATISTICS_update (stats, "# unrequested pull replies", 1,