[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 03/03: rps: move handlers struct
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 03/03: rps: move handlers struct |
Date: |
Fri, 29 Dec 2017 15:42:22 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit 9b6545e5fffced93341002c8ff7580a417867bcd
Author: Julius Bünger <address@hidden>
AuthorDate: Fri Dec 29 15:40:13 2017 +0100
rps: move handlers struct
---
src/rps/gnunet-service-rps.c | 43 ++++++++++++++++++++++---------------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 2f0b2c579..ec70075cf 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -3967,26 +3967,6 @@ run (void *cls,
const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_SERVICE_Handle *service)
{
- struct GNUNET_MQ_MessageHandler cadet_handlers[] = {
- GNUNET_MQ_hd_fixed_size (peer_check,
- GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE,
- struct GNUNET_MessageHeader,
- NULL),
- GNUNET_MQ_hd_fixed_size (peer_push,
- GNUNET_MESSAGE_TYPE_RPS_PP_PUSH,
- struct GNUNET_MessageHeader,
- NULL),
- GNUNET_MQ_hd_fixed_size (peer_pull_request,
- GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST,
- struct GNUNET_MessageHeader,
- NULL),
- GNUNET_MQ_hd_var_size (peer_pull_reply,
- GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY,
- struct GNUNET_RPS_P2P_PullReplyMessage,
- NULL),
- GNUNET_MQ_handler_end ()
- };
-
int size;
int out_size;
char* fn_valid_peers;
@@ -4076,6 +4056,27 @@ run (void *cls,
/* Initialise cadet */
+ /* There exists a copy-paste-clone in get_channel() */
+ struct GNUNET_MQ_MessageHandler cadet_handlers[] = {
+ GNUNET_MQ_hd_fixed_size (peer_check,
+ GNUNET_MESSAGE_TYPE_RPS_PP_CHECK_LIVE,
+ struct GNUNET_MessageHeader,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (peer_push,
+ GNUNET_MESSAGE_TYPE_RPS_PP_PUSH,
+ struct GNUNET_MessageHeader,
+ NULL),
+ GNUNET_MQ_hd_fixed_size (peer_pull_request,
+ GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REQUEST,
+ struct GNUNET_MessageHeader,
+ NULL),
+ GNUNET_MQ_hd_var_size (peer_pull_reply,
+ GNUNET_MESSAGE_TYPE_RPS_PP_PULL_REPLY,
+ struct GNUNET_RPS_P2P_PullReplyMessage,
+ NULL),
+ GNUNET_MQ_handler_end ()
+ };
+
cadet_handle = GNUNET_CADET_connect (cfg);
GNUNET_assert (NULL != cadet_handle);
GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_RPS,
@@ -4092,7 +4093,7 @@ run (void *cls,
peerinfo_handle = GNUNET_PEERINFO_connect (cfg);
Peers_initialise (fn_valid_peers, cadet_handle, cleanup_destroyed_channel,
- cadet_handlers, &own_identity);
+ &own_identity);
GNUNET_free (fn_valid_peers);
/* Initialise sampler */
--
To stop receiving notification emails like this one, please contact
address@hidden