[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37582 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37582 - gnunet/src/core |
Date: |
Mon, 25 Jul 2016 18:21:08 +0200 |
Author: grothoff
Date: 2016-07-25 18:21:08 +0200 (Mon, 25 Jul 2016)
New Revision: 37582
Modified:
gnunet/src/core/gnunet-service-core_kx.c
gnunet/src/core/gnunet-service-core_kx.h
gnunet/src/core/gnunet-service-core_neighbours.c
Log:
-preparatory steps for transport API change
Modified: gnunet/src/core/gnunet-service-core_kx.c
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.c 2016-07-25 00:33:28 UTC (rev
37581)
+++ gnunet/src/core/gnunet-service-core_kx.c 2016-07-25 16:21:08 UTC (rev
37582)
@@ -1608,6 +1608,41 @@
/**
+ * Obtain the array of message handlers provided by KX.
+ *
+ * @return NULL-entry terminated array of handlers
+ */
+const struct GNUNET_MQ_MessageHandler *
+GSC_KX_get_handlers (void)
+{
+#if 0
+ GNUNET_MQ_hd_fixed_size (ephemeral_key,
+ GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
+ struct EphemeralKeyMessage);
+ GNUNET_MQ_hd_fixed_size (ping,
+ PING,
+ struct PingMessage);
+ GNUNET_MQ_hd_fixed_size (pong,
+ PING,
+ struct PongMessage);
+ GNUNET_MQ_hd_var_size (encrypted,
+ PING,
+ struct ping);
+#endif
+ static struct GNUNET_MQ_MessageHandler handlers[] = {
+#if 0
+ make_ephemeral_key_handler (),
+ make_ping_handler (),
+ make_pong_handler (),
+ make_encrypted_handler (),
+#endif
+ GNUNET_MQ_handler_end()
+ };
+ return handlers;
+}
+
+
+/**
* Deliver P2P message to interested clients.
* Invokes send twice, once for clients that want the full message, and once
* for clients that only want the header
@@ -1641,10 +1676,12 @@
GSC_SESSIONS_confirm_typemap (dmc->peer, m);
return GNUNET_OK;
default:
- GSC_CLIENTS_deliver_message (dmc->peer, m,
+ GSC_CLIENTS_deliver_message (dmc->peer,
+ m,
ntohs (m->size),
GNUNET_CORE_OPTION_SEND_FULL_INBOUND);
- GSC_CLIENTS_deliver_message (dmc->peer, m,
+ GSC_CLIENTS_deliver_message (dmc->peer,
+ m,
sizeof (struct GNUNET_MessageHeader),
GNUNET_CORE_OPTION_SEND_HDR_INBOUND);
}
@@ -1686,8 +1723,8 @@
current_ekm.origin_identity = GSC_my_identity;
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_sign (my_private_key,
- ¤t_ekm.purpose,
- ¤t_ekm.signature));
+ ¤t_ekm.purpose,
+ ¤t_ekm.signature));
}
Modified: gnunet/src/core/gnunet-service-core_kx.h
===================================================================
--- gnunet/src/core/gnunet-service-core_kx.h 2016-07-25 00:33:28 UTC (rev
37581)
+++ gnunet/src/core/gnunet-service-core_kx.h 2016-07-25 16:21:08 UTC (rev
37582)
@@ -37,6 +37,15 @@
/**
+ * Obtain the array of message handlers provided by KX.
+ *
+ * @return NULL-entry terminated array of handlers
+ */
+const struct GNUNET_MQ_MessageHandler *
+GSC_KX_get_handlers (void);
+
+
+/**
* We received a EPHEMERAL_KEY message. Validate and update
* our key material and status.
*
Modified: gnunet/src/core/gnunet-service-core_neighbours.c
===================================================================
--- gnunet/src/core/gnunet-service-core_neighbours.c 2016-07-25 00:33:28 UTC
(rev 37581)
+++ gnunet/src/core/gnunet-service-core_neighbours.c 2016-07-25 16:21:08 UTC
(rev 37582)
@@ -479,9 +479,6 @@
case GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE:
GSC_KX_handle_encrypted_message (n->kxinfo, message);
break;
- case GNUNET_MESSAGE_TYPE_DUMMY:
- /* Dummy messages for testing / benchmarking, just discard */
- break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
_("Unsupported message of type %u (%u bytes) received from
peer `%s'\n"),
@@ -523,8 +520,8 @@
me->deadline = GNUNET_TIME_relative_to_absolute (timeout);
me->size = msize;
GNUNET_memcpy (&me[1],
- msg,
- msize);
+ msg,
+ msize);
GNUNET_CONTAINER_DLL_insert_tail (n->message_head,
n->message_tail,
me);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37582 - gnunet/src/core,
gnunet <=