[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34907 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34907 - gnunet/src/rps |
Date: |
Fri, 16 Jan 2015 18:19:49 +0100 |
Author: ch3
Date: 2015-01-16 18:19:49 +0100 (Fri, 16 Jan 2015)
New Revision: 34907
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
corrected message size check
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-01-16 14:39:37 UTC (rev 34906)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-01-16 17:19:49 UTC (rev 34907)
@@ -688,12 +688,6 @@
// (check the proof of work)
- if (ntohs(msg->size) != sizeof (struct GNUNET_MessageHeader))
- {
- GNUNET_break_op (0);
- return GNUNET_SYSERR;
- }
-
peer = (const struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info
(channel, GNUNET_CADET_OPTION_PEER);
// FIXME wait for cadet to change this function
LOG (GNUNET_ERROR_TYPE_DEBUG, "PUSH received (%s)\n", GNUNET_i2s (peer));
@@ -727,12 +721,6 @@
struct GNUNET_RPS_P2P_PullReplyMessage *out_msg;
- if (ntohs(msg->size) != sizeof (struct GNUNET_MessageHeader))
- {
- GNUNET_break_op (0); // At the moment our own implementation seems to
break that.
- return GNUNET_SYSERR;
- }
-
peer = (struct GNUNET_PeerIdentity *) GNUNET_CADET_channel_get_info
(channel, GNUNET_CADET_OPTION_PEER);
// FIXME wait for cadet to change this function
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1288,8 +1276,10 @@
/* Initialise cadet */
static const struct GNUNET_CADET_MessageHandler cadet_handlers[] = {
- {&handle_peer_push , GNUNET_MESSAGE_TYPE_RPS_PP_PUSH , 0},
- {&handle_peer_pull_request, GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST, 0},
+ {&handle_peer_push , GNUNET_MESSAGE_TYPE_RPS_PP_PUSH ,
+ sizeof (struct GNUNET_MessageHeader)},
+ {&handle_peer_pull_request, GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST,
+ sizeof (struct GNUNET_MessageHeader)},
{&handle_peer_pull_reply , GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY , 0},
{NULL, 0, 0}
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34907 - gnunet/src/rps,
gnunet <=