Use statement exprs instead of local function
authorDavid Barksdale <amatus.amongus@gmail.com>
Thu, 18 Aug 2016 00:03:29 +0000 (00:03 +0000)
committerDavid Barksdale <amatus.amongus@gmail.com>
Thu, 18 Aug 2016 00:03:29 +0000 (00:03 +0000)
This change lets us compile with clang again.

74 files changed:
src/arm/arm_api.c
src/arm/arm_monitor_api.c
src/ats-tests/ats-testing.c
src/ats/ats_api_performance.c
src/ats/ats_api_scheduling.c
src/cadet/cadet_api.c
src/consensus/consensus_api.c
src/conversation/conversation_api.c
src/conversation/conversation_api_call.c
src/core/core_api.c
src/core/core_api_2.c
src/core/core_api_monitor_peers.c
src/core/gnunet-service-core_kx.c
src/core/test_core_api.c
src/core/test_core_api_reliability.c
src/core/test_core_api_send_to_self.c
src/core/test_core_quota_compliance.c
src/datastore/datastore_api.c
src/dht/dht_api.c
src/dht/gnunet-service-dht_neighbours.c
src/dht/gnunet-service-wdht_neighbours.c
src/dht/gnunet-service-xdht_neighbours.c
src/dns/dns_api.c
src/dv/dv_api.c
src/dv/gnunet-service-dv.c
src/fs/fs_download.c
src/fs/fs_list_indexed.c
src/fs/fs_publish.c
src/fs/fs_search.c
src/fs/fs_unindex.c
src/fs/gnunet-service-fs.c
src/gns/gns_api.c
src/hostlist/gnunet-daemon-hostlist.c
src/hostlist/test_gnunet_daemon_hostlist_learning.c
src/identity-provider/identity_provider_api.c
src/identity/identity_api.c
src/include/gnunet_mq_lib.h
src/multicast/multicast_api.c
src/namecache/namecache_api.c
src/namestore/namestore_api.c
src/namestore/namestore_api_monitor.c
src/nse/gnunet-service-nse.c
src/nse/nse_api.c
src/peerinfo/peerinfo_api.c
src/peerinfo/peerinfo_api_notify.c
src/peerstore/peerstore_api.c
src/psyc/psyc_api.c
src/psycstore/psycstore_api.c
src/regex/regex_api_search.c
src/revocation/gnunet-service-revocation.c
src/revocation/revocation_api.c
src/rps/rps_api.c
src/scalarproduct/scalarproduct_api.c
src/secretsharing/secretsharing_api.c
src/set/set_api.c
src/social/social_api.c
src/statistics/statistics_api.c
src/testbed/testbed_api.c
src/testbed/testbed_api_barriers.c
src/topology/gnunet-daemon-topology.c
src/transport/gnunet-transport-profiler.c
src/transport/gnunet-transport.c
src/transport/transport-testing-main.c
src/transport/transport_api_address_to_string.c
src/transport/transport_api_blacklist.c
src/transport/transport_api_core.c
src/transport/transport_api_hello_get.c
src/transport/transport_api_monitor_peers.c
src/transport/transport_api_monitor_plugins.c
src/util/resolver_api.c
src/util/test_client.c
src/util/test_server.c
src/util/test_socks.c
src/vpn/vpn_api.c

index c8c5e8ba63943254bfaf955f44c6265efb25ec8b..5c4a1c794184dc1e4526092d07b3f61ceb153024 100644 (file)
@@ -453,19 +453,19 @@ mq_error_handler (void *cls,
 static int
 reconnect_arm (struct GNUNET_ARM_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (arm_result,
-                           GNUNET_MESSAGE_TYPE_ARM_RESULT,
-                           struct GNUNET_ARM_ResultMessage);
-  GNUNET_MQ_hd_var_size (arm_list_result,
-                         GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
-                         struct GNUNET_ARM_ListResultMessage);
-  GNUNET_MQ_hd_fixed_size (confirm,
-                           GNUNET_MESSAGE_TYPE_TEST,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_arm_result_handler (h),
-    make_arm_list_result_handler (h),
-    make_confirm_handler (h),
+    GNUNET_MQ_hd_fixed_size (arm_result,
+                             GNUNET_MESSAGE_TYPE_ARM_RESULT,
+                             struct GNUNET_ARM_ResultMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (arm_list_result,
+                           GNUNET_MESSAGE_TYPE_ARM_LIST_RESULT,
+                           struct GNUNET_ARM_ListResultMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (confirm,
+                             GNUNET_MESSAGE_TYPE_TEST,
+                             struct GNUNET_MessageHeader,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *test;
index 442320fe866f1fea2d4b503ef67748f8b42fa7b9..471393c7e13274dc52be228ff137960c556a1efe 100644 (file)
@@ -198,11 +198,11 @@ mq_error_handler (void *cls,
 static int
 reconnect_arm_monitor (struct GNUNET_ARM_MonitorHandle *h)
 {
-  GNUNET_MQ_hd_var_size (monitor_notify,
-                         GNUNET_MESSAGE_TYPE_ARM_STATUS,
-                         struct GNUNET_ARM_StatusMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_monitor_notify_handler (h),
+    GNUNET_MQ_hd_var_size (monitor_notify,
+                           GNUNET_MESSAGE_TYPE_ARM_STATUS,
+                           struct GNUNET_ARM_StatusMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *msg;
index 9f0519fa34ac4cca85f2d941fb180562dda5bdf2..eb30daa6b6af7bc3844fcc72b7cadb699e86e2b9 100644 (file)
@@ -348,16 +348,16 @@ static void *
 transport_connect_adapter (void *cls,
                            const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (ping,
-                           TEST_MESSAGE_TYPE_PING,
-                           struct TestMessage);
-  GNUNET_MQ_hd_fixed_size (pong,
-                           TEST_MESSAGE_TYPE_PONG,
-                           struct TestMessage);
   struct BenchmarkPeer *me = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_ping_handler (me),
-    make_pong_handler (me),
+    GNUNET_MQ_hd_fixed_size (ping,
+                             TEST_MESSAGE_TYPE_PING,
+                             struct TestMessage,
+                             me),
+    GNUNET_MQ_hd_fixed_size (pong,
+                             TEST_MESSAGE_TYPE_PONG,
+                             struct TestMessage,
+                             me),
     GNUNET_MQ_handler_end ()
   };
 
@@ -390,16 +390,16 @@ static void *
 core_connect_adapter (void *cls,
                      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (ping,
-                           TEST_MESSAGE_TYPE_PING,
-                           struct TestMessage);
-  GNUNET_MQ_hd_fixed_size (pong,
-                           TEST_MESSAGE_TYPE_PONG,
-                           struct TestMessage);
   struct BenchmarkPeer *me = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_ping_handler (me),
-    make_pong_handler (me),
+    GNUNET_MQ_hd_fixed_size (ping,
+                             TEST_MESSAGE_TYPE_PING,
+                             struct TestMessage,
+                             me),
+    GNUNET_MQ_hd_fixed_size (pong,
+                             TEST_MESSAGE_TYPE_PONG,
+                             struct TestMessage,
+                             me),
     GNUNET_MQ_handler_end ()
   };
 
index 7edc39e38992864d2ef0499fac4d9ebecd0f75ac..dd8666d4cc16af5bc350080d3464ed25af59bc4d 100644 (file)
@@ -566,19 +566,19 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_ATS_PerformanceHandle *ph)
 {
-  GNUNET_MQ_hd_var_size (peer_information,
-                         GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION,
-                         struct PeerInformationMessage);
-  GNUNET_MQ_hd_fixed_size (reservation_result,
-                           GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT,
-                           struct ReservationResultMessage);
-  GNUNET_MQ_hd_var_size (address_list,
-                         GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE,
-                         struct PeerInformationMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_peer_information_handler (ph),
-    make_reservation_result_handler (ph),
-    make_address_list_handler (ph),
+    GNUNET_MQ_hd_var_size (peer_information,
+                           GNUNET_MESSAGE_TYPE_ATS_PEER_INFORMATION,
+                           struct PeerInformationMessage,
+                           ph),
+    GNUNET_MQ_hd_fixed_size (reservation_result,
+                             GNUNET_MESSAGE_TYPE_ATS_RESERVATION_RESULT,
+                             struct ReservationResultMessage,
+                             ph),
+    GNUNET_MQ_hd_var_size (address_list,
+                           GNUNET_MESSAGE_TYPE_ATS_ADDRESSLIST_RESPONSE,
+                           struct PeerInformationMessage,
+                           ph),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index c4174f99e9af588e2adfcf1b32f8b0f3aa81c729..4a872b90a5b2a1362e5e45eedaaa0581e915a478 100644 (file)
@@ -515,15 +515,15 @@ send_add_address_message (struct GNUNET_ATS_SchedulingHandle *sh,
 static void
 reconnect (struct GNUNET_ATS_SchedulingHandle *sh)
 {
-  GNUNET_MQ_hd_fixed_size (ats_session_release,
-                          GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE,
-                          struct GNUNET_ATS_SessionReleaseMessage);
-  GNUNET_MQ_hd_fixed_size (ats_address_suggestion,
-                          GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION,
-                          struct AddressSuggestionMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_ats_session_release_handler (sh),
-    make_ats_address_suggestion_handler (sh),
+    GNUNET_MQ_hd_fixed_size (ats_session_release,
+                             GNUNET_MESSAGE_TYPE_ATS_SESSION_RELEASE,
+                             struct GNUNET_ATS_SessionReleaseMessage,
+                             sh),
+    GNUNET_MQ_hd_fixed_size (ats_address_suggestion,
+                             GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION,
+                             struct AddressSuggestionMessage,
+                             sh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *ev;
index 1d4530b6f867349aee794c1b559f75eb22748a74..d758155886c51312805bdd2dc636db01de2ecfbe 100644 (file)
@@ -1239,43 +1239,43 @@ handle_get_tunnel (void *cls,
 static int
 do_reconnect (struct GNUNET_CADET_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (channel_created,
-                           GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
-                           struct GNUNET_CADET_ChannelCreateMessage);
-  GNUNET_MQ_hd_fixed_size (channel_destroy,
-                           GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
-                           struct GNUNET_CADET_ChannelDestroyMessage);
-  GNUNET_MQ_hd_var_size (local_data,
-                         GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA,
-                         struct GNUNET_CADET_LocalData);
-  GNUNET_MQ_hd_fixed_size (local_ack,
-                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK,
-                           struct GNUNET_CADET_LocalAck);
-  GNUNET_MQ_hd_var_size (get_peers,
-                         GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS,
-                         struct GNUNET_CADET_LocalInfoPeer);
-  GNUNET_MQ_hd_var_size (get_peer,
-                         GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER,
-                         struct GNUNET_CADET_LocalInfoPeer);
-  GNUNET_MQ_hd_var_size (get_tunnels,
-                         GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS,
-                         struct GNUNET_CADET_LocalInfoTunnel);
-  GNUNET_MQ_hd_var_size (get_tunnel,
-                         GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL,
-                         struct GNUNET_CADET_LocalInfoTunnel);
+  struct GNUNET_MQ_MessageHandler handlers[] = {
+    GNUNET_MQ_hd_fixed_size (channel_created,
+                             GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE,
+                             struct GNUNET_CADET_ChannelCreateMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (channel_destroy,
+                             GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY,
+                             struct GNUNET_CADET_ChannelDestroyMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (local_data,
+                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA,
+                           struct GNUNET_CADET_LocalData,
+                           h),
+    GNUNET_MQ_hd_fixed_size (local_ack,
+                             GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK,
+                             struct GNUNET_CADET_LocalAck,
+                             h),
+    GNUNET_MQ_hd_var_size (get_peers,
+                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS,
+                           struct GNUNET_CADET_LocalInfoPeer,
+                           h),
+    GNUNET_MQ_hd_var_size (get_peer,
+                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER,
+                           struct GNUNET_CADET_LocalInfoPeer,
+                           h),
+    GNUNET_MQ_hd_var_size (get_tunnels,
+                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS,
+                           struct GNUNET_CADET_LocalInfoTunnel,
+                           h),
+    GNUNET_MQ_hd_var_size (get_tunnel,
+                           GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL,
+                           struct GNUNET_CADET_LocalInfoTunnel,
+                           h),
   // FIXME
 //   GNUNET_MQ_hd_fixed_Y       size (channel_destroyed,
 //                            GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK,
 //                            struct GNUNET_CADET_ChannelDestroyMessage);
-  struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_channel_created_handler (h),
-    make_channel_destroy_handler (h),
-    make_local_data_handler (h),
-    make_local_ack_handler (h),
-    make_get_peers_handler (h),
-    make_get_peer_handler (h),
-    make_get_tunnels_handler (h),
-    make_get_tunnel_handler (h),
     GNUNET_MQ_handler_end ()
   };
 
index 088fafd088509db91edadf27b02f85b4a9a36ea2..18898bebd36c40107333fc6098d97f87fd936c92 100644 (file)
@@ -202,17 +202,17 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
                          GNUNET_CONSENSUS_ElementCallback new_element_cb,
                          void *new_element_cls)
 {
-  GNUNET_MQ_hd_var_size (new_element,
-                         GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT,
-                         struct GNUNET_CONSENSUS_ElementMessage);
-  GNUNET_MQ_hd_fixed_size (conclude_done,
-                           GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_CONSENSUS_Handle *consensus
     = GNUNET_new (struct GNUNET_CONSENSUS_Handle);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_new_element_handler (consensus),
-    make_conclude_done_handler (consensus),
+    GNUNET_MQ_hd_var_size (new_element,
+                           GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT,
+                           struct GNUNET_CONSENSUS_ElementMessage,
+                           consensus),
+    GNUNET_MQ_hd_fixed_size (conclude_done,
+                             GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE,
+                             struct GNUNET_MessageHeader,
+                             consensus),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_CONSENSUS_JoinMessage *join_msg;
index 5dd9cf79e6a0dd45448a1e40e6dff02eefa67f11..8a74f0ca69eca9bcce6d2edbd0f7c43900865b93 100644 (file)
@@ -551,27 +551,27 @@ clean_up_callers (struct GNUNET_CONVERSATION_Phone *phone)
 static void
 reconnect_phone (struct GNUNET_CONVERSATION_Phone *phone)
 {
-  GNUNET_MQ_hd_fixed_size (phone_ring,
-                          GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
-                          struct ClientPhoneRingMessage);
-  GNUNET_MQ_hd_fixed_size (phone_hangup,
-                          GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
-                          struct ClientPhoneHangupMessage);
-  GNUNET_MQ_hd_fixed_size (phone_suspend,
-                          GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
-                          struct ClientPhoneSuspendMessage);
-  GNUNET_MQ_hd_fixed_size (phone_resume,
-                          GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
-                          struct ClientPhoneResumeMessage);
-  GNUNET_MQ_hd_var_size (phone_audio,
-                        GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
-                        struct ClientAudioMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_phone_ring_handler (phone),
-    make_phone_hangup_handler (phone),
-    make_phone_suspend_handler (phone),
-    make_phone_resume_handler (phone),
-    make_phone_audio_handler (phone),
+    GNUNET_MQ_hd_fixed_size (phone_ring,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING,
+                             struct ClientPhoneRingMessage,
+                             phone),
+    GNUNET_MQ_hd_fixed_size (phone_hangup,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
+                             struct ClientPhoneHangupMessage,
+                             phone),
+    GNUNET_MQ_hd_fixed_size (phone_suspend,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
+                             struct ClientPhoneSuspendMessage,
+                             phone),
+    GNUNET_MQ_hd_fixed_size (phone_resume,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
+                             struct ClientPhoneResumeMessage,
+                             phone),
+    GNUNET_MQ_hd_var_size (phone_audio,
+                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
+                           struct ClientAudioMessage,
+                           phone),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *e;
index af05f3ea678762671b8f4769ea6ab86bd36cc93d..17e26465e1430353edaa22fd386e013fa1731453 100644 (file)
@@ -543,29 +543,29 @@ GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
                                GNUNET_CONVERSATION_CallEventHandler event_handler,
                                void *event_handler_cls)
 {
-  GNUNET_MQ_hd_fixed_size (call_suspend,
-                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
-                           struct ClientPhoneSuspendMessage);
-  GNUNET_MQ_hd_fixed_size (call_resume,
-                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
-                           struct ClientPhoneResumeMessage);
-  GNUNET_MQ_hd_fixed_size (call_picked_up,
-                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
-                           struct ClientPhonePickedupMessage);
-  GNUNET_MQ_hd_fixed_size (call_hangup,
-                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
-                           struct ClientPhoneHangupMessage);
-  GNUNET_MQ_hd_var_size (call_audio,
-                         GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
-                         struct ClientAudioMessage);
   struct GNUNET_CONVERSATION_Call *call
     = GNUNET_new (struct GNUNET_CONVERSATION_Call);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_call_suspend_handler (call),
-    make_call_resume_handler (call),
-    make_call_picked_up_handler (call),
-    make_call_hangup_handler (call),
-    make_call_audio_handler (call),
+    GNUNET_MQ_hd_fixed_size (call_suspend,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND,
+                             struct ClientPhoneSuspendMessage,
+                             call),
+    GNUNET_MQ_hd_fixed_size (call_resume,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME,
+                             struct ClientPhoneResumeMessage,
+                             call),
+    GNUNET_MQ_hd_fixed_size (call_picked_up,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP,
+                             struct ClientPhonePickedupMessage,
+                             call),
+    GNUNET_MQ_hd_fixed_size (call_hangup,
+                             GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP,
+                             struct ClientPhoneHangupMessage,
+                             call),
+    GNUNET_MQ_hd_var_size (call_audio,
+                           GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO,
+                           struct ClientAudioMessage,
+                           call),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_CRYPTO_EcdsaPublicKey my_zone;
index caf614afc186f88553ad7fa812d13a408656cbe6..6055b99c1acad9060eaf4d84c60ca73f6efce6a7 100644 (file)
@@ -767,31 +767,31 @@ handle_send_ready (void *cls,
 static void
 reconnect (struct GNUNET_CORE_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (init_reply,
-                           GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
-                           struct InitReplyMessage);
-  GNUNET_MQ_hd_fixed_size (connect_notify,
-                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
-                           struct ConnectNotifyMessage);
-  GNUNET_MQ_hd_fixed_size (disconnect_notify,
-                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
-                           struct DisconnectNotifyMessage);
-  GNUNET_MQ_hd_var_size (notify_inbound,
-                         GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
-                         struct NotifyTrafficMessage);
-  GNUNET_MQ_hd_var_size (notify_outbound,
-                         GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND,
-                         struct NotifyTrafficMessage);
-  GNUNET_MQ_hd_fixed_size (send_ready,
-                           GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
-                           struct SendMessageReady);
- struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_init_reply_handler (h),
-    make_connect_notify_handler (h),
-    make_disconnect_notify_handler (h),
-    make_notify_inbound_handler (h),
-    make_notify_outbound_handler (h),
-    make_send_ready_handler (h),
+  struct GNUNET_MQ_MessageHandler handlers[] = {
+    GNUNET_MQ_hd_fixed_size (init_reply,
+                             GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
+                             struct InitReplyMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (connect_notify,
+                             GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
+                             struct ConnectNotifyMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (disconnect_notify,
+                             GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
+                             struct DisconnectNotifyMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (notify_inbound,
+                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
+                           struct NotifyTrafficMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (notify_outbound,
+                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND,
+                           struct NotifyTrafficMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (send_ready,
+                             GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
+                             struct SendMessageReady,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct InitMessage *init;
index 536fe597c8a92274bac953caa9f1698d6a29e073..d810bf2ec783506b4ea49c6b126b3354f638616d 100644 (file)
@@ -700,27 +700,27 @@ handle_send_ready (void *cls,
 static void
 reconnect (struct GNUNET_CORE_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (init_reply,
-                           GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
-                           struct InitReplyMessage);
-  GNUNET_MQ_hd_fixed_size (connect_notify,
-                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
-                           struct ConnectNotifyMessage);
-  GNUNET_MQ_hd_fixed_size (disconnect_notify,
-                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
-                           struct DisconnectNotifyMessage);
-  GNUNET_MQ_hd_var_size (notify_inbound,
-                         GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
-                         struct NotifyTrafficMessage);
-  GNUNET_MQ_hd_fixed_size (send_ready,
-                           GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
-                           struct SendMessageReady);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_init_reply_handler (h),
-    make_connect_notify_handler (h),
-    make_disconnect_notify_handler (h),
-    make_notify_inbound_handler (h),
-    make_send_ready_handler (h),
+    GNUNET_MQ_hd_fixed_size (init_reply,
+                             GNUNET_MESSAGE_TYPE_CORE_INIT_REPLY,
+                             struct InitReplyMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (connect_notify,
+                             GNUNET_MESSAGE_TYPE_CORE_NOTIFY_CONNECT,
+                             struct ConnectNotifyMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (disconnect_notify,
+                             GNUNET_MESSAGE_TYPE_CORE_NOTIFY_DISCONNECT,
+                             struct DisconnectNotifyMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (notify_inbound,
+                           GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND,
+                           struct NotifyTrafficMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (send_ready,
+                             GNUNET_MESSAGE_TYPE_CORE_SEND_READY,
+                             struct SendMessageReady,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct InitMessage *init;
index bafcd3e94231859b520a260d14eddc975822d22e..1455eb2b01633a1e8f659e8dbe33e241bb80d65e 100644 (file)
@@ -114,11 +114,11 @@ handle_receive_info (void *cls,
 static void
 reconnect (struct GNUNET_CORE_MonitorHandle *mh)
 {
-  GNUNET_MQ_hd_fixed_size (receive_info,
-                           GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY,
-                           struct MonitorNotifyMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_receive_info_handler (mh),
+    GNUNET_MQ_hd_fixed_size (receive_info,
+                             GNUNET_MESSAGE_TYPE_CORE_MONITOR_NOTIFY,
+                             struct MonitorNotifyMessage,
+                             mh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index b2949a68883cd69bb0f163edaab7d535050f01d0..6f6786d891b6090ff41ae565d58f46728544f781 100644 (file)
@@ -1814,23 +1814,23 @@ int
 GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk,
              struct GNUNET_SERVER_Handle *server)
 {
-  GNUNET_MQ_hd_fixed_size (ephemeral_key,
-                          GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
-                          struct EphemeralKeyMessage);
-  GNUNET_MQ_hd_fixed_size (ping,
-                          GNUNET_MESSAGE_TYPE_CORE_PING,
-                          struct PingMessage);
-  GNUNET_MQ_hd_fixed_size (pong,
-                          GNUNET_MESSAGE_TYPE_CORE_PONG,
-                          struct PongMessage);
-  GNUNET_MQ_hd_var_size (encrypted,
-                        GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE,
-                        struct EncryptedMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_ephemeral_key_handler (NULL),
-    make_ping_handler (NULL),
-    make_pong_handler (NULL),
-    make_encrypted_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (ephemeral_key,
+                             GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY,
+                             struct EphemeralKeyMessage,
+                             NULL),
+    GNUNET_MQ_hd_fixed_size (ping,
+                             GNUNET_MESSAGE_TYPE_CORE_PING,
+                             struct PingMessage,
+                             NULL),
+    GNUNET_MQ_hd_fixed_size (pong,
+                             GNUNET_MESSAGE_TYPE_CORE_PONG,
+                             struct PongMessage,
+                             NULL),
+    GNUNET_MQ_hd_var_size (encrypted,
+                           GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE,
+                           struct EncryptedMessage,
+                           NULL),
     GNUNET_MQ_handler_end()
   };
 
index 772ded991b8ae8dd7d84615186a476967d5509f4..650c89cda87b22a441ab6a5b3e5c509f14dbb847 100644 (file)
@@ -225,12 +225,12 @@ static void
 init_notify (void *cls,
              const struct GNUNET_PeerIdentity *my_identity)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          MTYPE,
-                          struct GNUNET_MessageHeader);
   struct PeerContext *p = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct GNUNET_MessageHeader,
+                             NULL);
     GNUNET_MQ_handler_end ()
   };
 
@@ -298,11 +298,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          MTYPE,
-                          struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct GNUNET_MessageHeader,
+                             NULL);
     GNUNET_MQ_handler_end ()
   };
 
index d7d4a6bd6d729556fef83b196b3611b7f84de7dd..4d8d54028296bda1a6b2abaa8ab2d0514ac30f4a 100644 (file)
@@ -322,12 +322,12 @@ static void
 init_notify (void *cls,
              const struct GNUNET_PeerIdentity *my_identity)
 {
-  GNUNET_MQ_hd_var_size (test,
-                        MTYPE,
-                        struct TestMessage);
   struct PeerContext *p = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_var_size (test,
+                           MTYPE,
+                           struct TestMessage,
+                           NULL);
     GNUNET_MQ_handler_end ()
   };
 
@@ -442,11 +442,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          MTYPE,
-                          struct TestMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct TestMessage,
+                             NULL);
     GNUNET_MQ_handler_end ()
   };
 
index 111aea900d02ff65500df242b6f3b51507671ede..d29da651b37cc2bacda01d27bc2e24cc0b4121a0 100644 (file)
@@ -150,11 +150,11 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg,
      struct GNUNET_TESTING_Peer *peer)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                          GNUNET_MESSAGE_TYPE_DUMMY,
-                          struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             GNUNET_MESSAGE_TYPE_DUMMY,
+                             struct GNUNET_MessageHeader,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
index 31063b814deefb4eb50681602aee789122964673..4dee958f2db0d6586b2b2b7a4df99da0e9bcea1c 100644 (file)
@@ -461,12 +461,12 @@ static void
 init_notify (void *cls,
              const struct GNUNET_PeerIdentity *my_identity)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                           MTYPE,
-                           struct TestMessage);
   struct PeerContext *p = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct TestMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
@@ -593,11 +593,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                           MTYPE,
-                           struct TestMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (test,
+                             MTYPE,
+                             struct TestMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
index 3f8ef9db447d836dec31761b6302b3a7e43408f9..d75a58552810f7045caedf999e2c2d656c966863 100644 (file)
@@ -848,20 +848,20 @@ handle_data_end (void *cls,
 static void
 try_reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (status,
-                         GNUNET_MESSAGE_TYPE_DATASTORE_STATUS,
-                         struct StatusMessage);
-  GNUNET_MQ_hd_var_size (data,
-                         GNUNET_MESSAGE_TYPE_DATASTORE_DATA,
-                         struct DataMessage);
-  GNUNET_MQ_hd_fixed_size (data_end,
-                           GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_DATASTORE_Handle *h = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_status_handler (h),
-    make_data_handler (h),
-    make_data_end_handler (h),
+    GNUNET_MQ_hd_var_size (status,
+                           GNUNET_MESSAGE_TYPE_DATASTORE_STATUS,
+                           struct StatusMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (data,
+                           GNUNET_MESSAGE_TYPE_DATASTORE_DATA,
+                           struct DataMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (data_end,
+                             GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END,
+                             struct GNUNET_MessageHeader,
+                             h),
     GNUNET_MQ_handler_end ()
   };
 
index 0ada4166269c8d604ea5d6a561739c8adbae6a5d..57880165eaa8e96c9ce7f509ae05efd45c6d7e8b 100644 (file)
@@ -842,27 +842,27 @@ handle_put_confirmation (void *cls,
 static int
 try_connect (struct GNUNET_DHT_Handle *h)
 {
-  GNUNET_MQ_hd_var_size (monitor_get,
-                         GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET,
-                         struct GNUNET_DHT_MonitorGetMessage);
-  GNUNET_MQ_hd_var_size (monitor_get_resp,
-                         GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP,
-                         struct GNUNET_DHT_MonitorGetRespMessage);
-  GNUNET_MQ_hd_var_size (monitor_put,
-                         GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT,
-                         struct GNUNET_DHT_MonitorPutMessage);
-  GNUNET_MQ_hd_var_size (client_result,
-                         GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT,
-                         struct GNUNET_DHT_ClientResultMessage);
-  GNUNET_MQ_hd_fixed_size (put_confirmation,
-                           GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK,
-                           struct GNUNET_DHT_ClientPutConfirmationMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_monitor_get_handler (h),
-    make_monitor_get_resp_handler (h),
-    make_monitor_put_handler (h),
-    make_client_result_handler (h),
-    make_put_confirmation_handler (h),
+    GNUNET_MQ_hd_var_size (monitor_get,
+                           GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET,
+                           struct GNUNET_DHT_MonitorGetMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (monitor_get_resp,
+                           GNUNET_MESSAGE_TYPE_DHT_MONITOR_GET_RESP,
+                           struct GNUNET_DHT_MonitorGetRespMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (monitor_put,
+                           GNUNET_MESSAGE_TYPE_DHT_MONITOR_PUT,
+                           struct GNUNET_DHT_MonitorPutMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (client_result,
+                           GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT,
+                           struct GNUNET_DHT_ClientResultMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (put_confirmation,
+                             GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT_OK,
+                             struct GNUNET_DHT_ClientPutConfirmationMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   if (NULL != h->mq)
index 2dd6c800b0e471bf3a5308a69f1168784096fa78..683e0991a90490d5c57966e7bac7af09d6549825 100644 (file)
@@ -2298,19 +2298,19 @@ handle_dht_p2p_result (void *cls,
 int
 GDS_NEIGHBOURS_init ()
 {
-  GNUNET_MQ_hd_var_size (dht_p2p_get,
-                        GNUNET_MESSAGE_TYPE_DHT_P2P_GET,
-                        struct PeerGetMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_put,
-                        GNUNET_MESSAGE_TYPE_DHT_P2P_PUT,
-                        struct PeerPutMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_result,
-                        GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT,
-                        struct PeerResultMessage);
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_dht_p2p_get_handler (NULL),
-    make_dht_p2p_put_handler (NULL),
-    make_dht_p2p_result_handler (NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_get,
+                           GNUNET_MESSAGE_TYPE_DHT_P2P_GET,
+                           struct PeerGetMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_put,
+                           GNUNET_MESSAGE_TYPE_DHT_P2P_PUT,
+                           struct PeerPutMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_result,
+                           GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT,
+                           struct PeerResultMessage,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   unsigned long long temp_config_num;
index 1d5fd67c0c05b6a022cc73993816c60c32369904..a6ebdb033b061c621ebb1fbc1acc31178dec245e 100644 (file)
@@ -1666,23 +1666,23 @@ handle_dht_p2p_trail_route (void *cls,
 int
 GDS_NEIGHBOURS_init (void)
 {
-  GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk,
-                          GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK,
-                          struct RandomWalkMessage);
-  GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk_response,
-                          GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE,
-                          struct RandomWalkResponseMessage);
-  GNUNET_MQ_hd_fixed_size (dht_p2p_trail_destroy,
-                          GNUNET_MESSAGE_TYPE_WDHT_TRAIL_DESTROY,
-                          struct TrailDestroyMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_trail_route,
-                        GNUNET_MESSAGE_TYPE_WDHT_TRAIL_ROUTE,
-                        struct TrailRouteMessage);
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_dht_p2p_random_walk_handler (NULL),
-    make_dht_p2p_random_walk_response_handler (NULL),
-    make_dht_p2p_trail_destroy_handler (NULL),
-    make_dht_p2p_trail_route_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk,
+                             GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK,
+                             struct RandomWalkMessage,
+                             NULL),
+    GNUNET_MQ_hd_fixed_size (dht_p2p_random_walk_response,
+                             GNUNET_MESSAGE_TYPE_WDHT_RANDOM_WALK_RESPONSE,
+                             struct RandomWalkResponseMessage,
+                             NULL),
+    GNUNET_MQ_hd_fixed_size (dht_p2p_trail_destroy,
+                             GNUNET_MESSAGE_TYPE_WDHT_TRAIL_DESTROY,
+                             struct TrailDestroyMessage,
+                             NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_trail_route,
+                           GNUNET_MESSAGE_TYPE_WDHT_TRAIL_ROUTE,
+                           struct TrailRouteMessage,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
 
index 7bfc11918adb5477c06636abd03a6c898c68b20f..9ae39e0a088d7298d600abfb6809410d8fdad118 100644 (file)
@@ -6039,55 +6039,55 @@ finger_table_init ()
 int
 GDS_NEIGHBOURS_init (void)
 {
-  GNUNET_MQ_hd_var_size (dht_p2p_put,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_PUT,
-                         struct PeerPutMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_get,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_GET,
-                         struct PeerGetMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_get_result,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_GET_RESULT,
-                         struct PeerGetResultMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_trail_setup,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP,
-                         struct PeerTrailSetupMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_result,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_RESULT,
-                         struct PeerTrailSetupResultMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_verify_successor,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR,
-                         struct PeerVerifySuccessorMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_verify_successor_result,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR_RESULT,
-                         struct PeerVerifySuccessorResultMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_notify_new_successor,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_NEW_SUCCESSOR,
-                         struct PeerNotifyNewSuccessorMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_rejection,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_REJECTION,
-                         struct PeerTrailRejectionMessage);
-  GNUNET_MQ_hd_fixed_size (dht_p2p_trail_teardown,
-                          GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_TEARDOWN,
-                          struct PeerTrailTearDownMessage);
-  GNUNET_MQ_hd_var_size (dht_p2p_add_trail,
-                         GNUNET_MESSAGE_TYPE_XDHT_P2P_ADD_TRAIL,
-                         struct PeerAddTrailMessage);
-  GNUNET_MQ_hd_fixed_size (dht_p2p_notify_succ_confirmation,
-                          GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION,
-                          struct PeerNotifyConfirmationMessage);
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_dht_p2p_put_handler (NULL),
-    make_dht_p2p_get_handler (NULL),
-    make_dht_p2p_get_result_handler (NULL),
-    make_dht_p2p_trail_setup_handler (NULL),
-    make_dht_p2p_trail_setup_result_handler (NULL),
-    make_dht_p2p_verify_successor_handler (NULL),
-    make_dht_p2p_verify_successor_result_handler (NULL),
-    make_dht_p2p_notify_new_successor_handler (NULL),
-    make_dht_p2p_trail_setup_rejection_handler (NULL),
-    make_dht_p2p_trail_teardown_handler (NULL),
-    make_dht_p2p_add_trail_handler (NULL),
-    make_dht_p2p_notify_succ_confirmation_handler (NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_put,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_PUT,
+                           struct PeerPutMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_get,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_GET,
+                           struct PeerGetMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_get_result,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_GET_RESULT,
+                           struct PeerGetResultMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_trail_setup,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP,
+                           struct PeerTrailSetupMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_result,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_RESULT,
+                           struct PeerTrailSetupResultMessag,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_verify_successor,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR,
+                           struct PeerVerifySuccessorMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_verify_successor_result,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_VERIFY_SUCCESSOR_RESULT,
+                           struct PeerVerifySuccessorResultMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_notify_new_successor,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_NEW_SUCCESSOR,
+                           struct PeerNotifyNewSuccessorMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_trail_setup_rejection,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_SETUP_REJECTION,
+                           struct PeerTrailRejectionMessage,
+                           NULL),
+    GNUNET_MQ_hd_fixed_size (dht_p2p_trail_teardown,
+                             GNUNET_MESSAGE_TYPE_XDHT_P2P_TRAIL_TEARDOWN,
+                             struct PeerTrailTearDownMessage,
+                             NULL),
+    GNUNET_MQ_hd_var_size (dht_p2p_add_trail,
+                           GNUNET_MESSAGE_TYPE_XDHT_P2P_ADD_TRAIL,
+                           struct PeerAddTrailMessage,
+                           NULL),
+    GNUNET_MQ_hd_fixed_size (dht_p2p_notify_succ_confirmation,
+                             GNUNET_MESSAGE_TYPE_XDHT_P2P_NOTIFY_SUCCESSOR_CONFIRMATION,
+                             struct PeerNotifyConfirmationMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
 
index 08d5df4a1c0fd03eafdb7e287ec060e3765f15f7..4803fe3fc006ae7c8c9eb78fedc09c6dbe9122b7 100644 (file)
@@ -205,12 +205,12 @@ handle_request (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (request,
-                         GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST,
-                         struct GNUNET_DNS_Request);
   struct GNUNET_DNS_Handle *dh = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_request_handler (dh),
+    GNUNET_MQ_hd_var_size (request,
+                           GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST,
+                           struct GNUNET_DNS_Request,
+                           dh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 76a6ea4841133e564f6ef1d2303d52d0e91db417..43b6c7db173dcc5ccb95ff9ac42b379d0cd79bbd 100644 (file)
@@ -314,23 +314,23 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_DV_ServiceHandle *sh)
 {
-  GNUNET_MQ_hd_fixed_size (connect,
-                           GNUNET_MESSAGE_TYPE_DV_CONNECT,
-                           struct GNUNET_DV_ConnectMessage);
-  GNUNET_MQ_hd_fixed_size (disconnect,
-                           GNUNET_MESSAGE_TYPE_DV_DISCONNECT,
-                           struct GNUNET_DV_DisconnectMessage);
-  GNUNET_MQ_hd_fixed_size (distance_update,
-                           GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED,
-                           struct GNUNET_DV_DistanceUpdateMessage);
-  GNUNET_MQ_hd_var_size (received,
-                         GNUNET_MESSAGE_TYPE_DV_RECV,
-                         struct GNUNET_DV_ReceivedMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_connect_handler (sh),
-    make_disconnect_handler (sh),
-    make_distance_update_handler (sh),
-    make_received_handler (sh),
+    GNUNET_MQ_hd_fixed_size (connect,
+                             GNUNET_MESSAGE_TYPE_DV_CONNECT,
+                             struct GNUNET_DV_ConnectMessage,
+                             sh),
+    GNUNET_MQ_hd_fixed_size (disconnect,
+                             GNUNET_MESSAGE_TYPE_DV_DISCONNECT,
+                             struct GNUNET_DV_DisconnectMessage,
+                             sh),
+    GNUNET_MQ_hd_fixed_size (distance_update,
+                             GNUNET_MESSAGE_TYPE_DV_DISTANCE_CHANGED,
+                             struct GNUNET_DV_DistanceUpdateMessage,
+                             sh),
+    GNUNET_MQ_hd_var_size (received,
+                           GNUNET_MESSAGE_TYPE_DV_RECV,
+                           struct GNUNET_DV_ReceivedMessage,
+                           sh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *sm;
index 11ec13387c71384030310b1e835982d0e605c6e3..667970b755c953ab0d7eb386483cbc83826de006 100644 (file)
@@ -2033,11 +2033,11 @@ run (void *cls,
      struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  GNUNET_MQ_hd_var_size (dv_route_message,
-                        GNUNET_MESSAGE_TYPE_DV_ROUTE,
-                        struct RouteMessage);
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_dv_route_message_handler (NULL),
+    GNUNET_MQ_hd_var_size (dv_route_message,
+                           GNUNET_MESSAGE_TYPE_DV_ROUTE,
+                           struct RouteMessage,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   static struct GNUNET_SERVER_MessageHandler plugin_handlers[] = {
index 98c76882a5de0a997428fac7b5527e67b6093e56..eacc3c2dfbd33a45587b5f713fd8e164f9b2bbfb 100644 (file)
@@ -1325,12 +1325,12 @@ download_mq_error_handler (void *cls,
 static void
 do_reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (put,
-                         GNUNET_MESSAGE_TYPE_FS_PUT,
-                         struct ClientPutMessage);
   struct GNUNET_FS_DownloadContext *dc = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_put_handler (dc),
+    GNUNET_MQ_hd_var_size (put,
+                           GNUNET_MESSAGE_TYPE_FS_PUT,
+                           struct ClientPutMessage,
+                           dc),
     GNUNET_MQ_handler_end ()
   };
 
index 21385d40bb09d27876d18c74bc12bf15a82da119..67183fce2472a42526088910a84226daf6d1faef 100644 (file)
@@ -169,17 +169,17 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
                              GNUNET_FS_IndexedFileProcessor iterator,
                              void *iterator_cls)
 {
-  GNUNET_MQ_hd_fixed_size (index_info_end,
-                           GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (index_info,
-                         GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY,
-                         struct IndexInfoMessage);
   struct GNUNET_FS_GetIndexedContext *gic
     = GNUNET_new (struct GNUNET_FS_GetIndexedContext);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_index_info_end_handler (gic),
-    make_index_info_handler (gic),
+    GNUNET_MQ_hd_fixed_size (index_info_end,
+                             GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END,
+                             struct GNUNET_MessageHeader,
+                             gic),
+    GNUNET_MQ_hd_var_size (index_info,
+                           GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY,
+                           struct IndexInfoMessage,
+                           gic),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 01305d678c7145a5372b7619a7cb28c2dd16204b..5820c3d0c8ac34d320408d8c2f1d6a3209b622fb 100644 (file)
@@ -795,16 +795,16 @@ static void
 hash_for_index_cb (void *cls,
                   const struct GNUNET_HashCode *res)
 {
-  GNUNET_MQ_hd_fixed_size (index_start_ok,
-                           GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (index_start_failed,
-                         GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED,
-                         struct GNUNET_MessageHeader);
   struct GNUNET_FS_PublishContext *pc = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_index_start_ok_handler (pc),
-    make_index_start_failed_handler (pc),
+    GNUNET_MQ_hd_fixed_size (index_start_ok,
+                             GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK,
+                             struct GNUNET_MessageHeader,
+                             pc),
+    GNUNET_MQ_hd_var_size (index_start_failed,
+                           GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED,
+                           struct GNUNET_MessageHeader,
+                           pc),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_FS_FileInformation *p;
@@ -1003,11 +1003,11 @@ loc_mq_error_handler (void *cls,
 static void
 create_loc_uri (struct GNUNET_FS_PublishContext *pc)
 {
-  GNUNET_MQ_hd_fixed_size (signature_response,
-                           GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE,
-                           struct ResponseLocSignatureMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_signature_response_handler (pc),
+    GNUNET_MQ_hd_fixed_size (signature_response,
+                             GNUNET_MESSAGE_TYPE_FS_REQUEST_LOC_SIGNATURE,
+                             struct ResponseLocSignatureMessage,
+                             pc),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 8a3652e3f492d7920cffaefa47171cde35207db6..7874bb6e075342d5497095237f033c48c908f26a 100644 (file)
@@ -1234,12 +1234,12 @@ search_mq_error_handler (void *cls,
 static void
 do_reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (result,
-                         GNUNET_MESSAGE_TYPE_FS_PUT,
-                         struct ClientPutMessage);
   struct GNUNET_FS_SearchContext *sc = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_result_handler (sc),
+    GNUNET_MQ_hd_var_size (result,
+                           GNUNET_MESSAGE_TYPE_FS_PUT,
+                           struct ClientPutMessage,
+                           sc),
     GNUNET_MQ_handler_end ()
   };
 
index f43725a594f2075fc18ce3b599ac6b45bf0faf49..2a024ecbba22342f1657f86c8250fc21d5944b2a 100644 (file)
@@ -288,11 +288,11 @@ unindex_mq_error_handler (void *cls,
 static void
 unindex_finish (struct GNUNET_FS_UnindexContext *uc)
 {
-  GNUNET_MQ_hd_fixed_size (unindex_response,
-                           GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_unindex_response_handler (uc),
+    GNUNET_MQ_hd_fixed_size (unindex_response,
+                             GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK,
+                             struct GNUNET_MessageHeader,
+                             uc),
     GNUNET_MQ_handler_end ()
   };
   char *emsg;
index bc0da09bc148ee96ba60d59e24fec832827edd42..4131b16708c918009afaf0dae1ea9563354a189e 100644 (file)
@@ -617,22 +617,22 @@ static int
 main_init (struct GNUNET_SERVER_Handle *server,
            const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  GNUNET_MQ_hd_var_size (p2p_get,
-                        GNUNET_MESSAGE_TYPE_FS_GET,
-                        struct GetMessage);
-  GNUNET_MQ_hd_var_size (p2p_put,
-                        GNUNET_MESSAGE_TYPE_FS_PUT,
-                        struct PutMessage);
-  GNUNET_MQ_hd_fixed_size (p2p_migration_stop,
-                          GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP,
-                          struct MigrationStopMessage);
   struct GNUNET_MQ_MessageHandler no_p2p_handlers[] = {
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_MessageHandler p2p_handlers[] = {
-    make_p2p_get_handler (NULL),
-    make_p2p_put_handler (NULL),
-    make_p2p_migration_stop_handler (NULL),
+    GNUNET_MQ_hd_var_size (p2p_get,
+                           GNUNET_MESSAGE_TYPE_FS_GET,
+                           struct GetMessage,
+                           NULL),
+    GNUNET_MQ_hd_var_size (p2p_put,
+                           GNUNET_MESSAGE_TYPE_FS_PUT,
+                           struct PutMessage,
+                           NULL),
+    GNUNET_MQ_hd_fixed_size (p2p_migration_stop,
+                             GNUNET_MESSAGE_TYPE_FS_MIGRATION_STOP,
+                             struct MigrationStopMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
   static const struct GNUNET_SERVER_MessageHandler handlers[] = {
index c45f5bc3dbc4df03aba4aa7c34ed427de91108e2..475d5b5cdc76dc676f1172c2f79edee25a6cc94a 100644 (file)
@@ -264,11 +264,11 @@ handle_result (void *cls,
 static void
 reconnect (struct GNUNET_GNS_Handle *handle)
 {
-  GNUNET_MQ_hd_var_size (result,
-                         GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT,
-                         struct GNUNET_GNS_ClientLookupResultMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_result_handler (handle),
+    GNUNET_MQ_hd_var_size (result,
+                           GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT,
+                           struct GNUNET_GNS_ClientLookupResultMessage,
+                           handle),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_GNS_LookupRequest *lh;
index 44db599492bd8546795ca89d64e8c449596c5cbd..7181a913b51c5665871f2df2dd92c02e23cc2034 100644 (file)
@@ -296,11 +296,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_var_size (advertisement,
-                        GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
-                        struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler learn_handlers[] = {
-    make_advertisement_handler (NULL),
+    GNUNET_MQ_hd_var_size (advertisement,
+                           GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
+                           struct GNUNET_MessageHeader,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_MessageHandler no_learn_handlers[] = {
index 041898abd91d1554d36f360e91b9de72f428959c..c39c57eb369f504cc8f9ed7749bbd64d75860abd 100644 (file)
@@ -394,11 +394,11 @@ static void
 setup_learn_peer (struct PeerContext *p,
                  const char *cfgname)
 {
-  GNUNET_MQ_hd_var_size (ad_arrive,
-                        GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
-                        struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler learn_handlers[] = {
-    make_ad_arrive_handler (NULL),
+    GNUNET_MQ_hd_var_size (ad_arrive,
+                           GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT,
+                           struct GNUNET_MessageHeader,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   char *filename;
index 6e1b867de685d7a0c4da696f77d0777c06723a54..8317d18ad97d203e457fa6db30f0d1599e0872ac 100644 (file)
@@ -363,15 +363,15 @@ handle_result (void *cls,
 static void
 reconnect (struct GNUNET_IDENTITY_PROVIDER_Handle *h)
 {
-  GNUNET_MQ_hd_var_size (result,
-                         GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT,
-                         struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage);
-  GNUNET_MQ_hd_var_size (exchange_result,
-                         GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT,
-                         struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_result_handler (h),
-    make_exchange_result_handler (h),
+    GNUNET_MQ_hd_var_size (result,
+                           GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_ISSUE_RESULT,
+                           struct GNUNET_IDENTITY_PROVIDER_IssueResultMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (exchange_result,
+                           GNUNET_MESSAGE_TYPE_IDENTITY_PROVIDER_EXCHANGE_RESULT,
+                           struct GNUNET_IDENTITY_PROVIDER_ExchangeResultMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_IDENTITY_PROVIDER_Operation *op;
index 4c8a35dc2053938b18da464186fa0d0b13ddfbfb..dd61fdfb43bf8cffb8f3111c1f385ec9f48eb4e6 100644 (file)
@@ -552,20 +552,20 @@ handle_identity_set_default (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (identity_result_code,
-                         GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE,
-                         struct GNUNET_IDENTITY_ResultCodeMessage);
-  GNUNET_MQ_hd_var_size (identity_update,
-                         GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE,
-                         struct GNUNET_IDENTITY_UpdateMessage);
-  GNUNET_MQ_hd_var_size (identity_set_default,
-                         GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT,
-                         struct GNUNET_IDENTITY_SetDefaultMessage);
   struct GNUNET_IDENTITY_Handle *h = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_identity_result_code_handler (h),
-    make_identity_update_handler (h),
-    make_identity_set_default_handler (h),
+    GNUNET_MQ_hd_var_size (identity_result_code,
+                           GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE,
+                           struct GNUNET_IDENTITY_ResultCodeMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (identity_update,
+                           GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE,
+                           struct GNUNET_IDENTITY_UpdateMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (identity_set_default,
+                           GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT,
+                           struct GNUNET_IDENTITY_SetDefaultMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index d383adbb5e259c04e1d69ee30cad80fdd6ec243e..86144abcaa07b1701b7bae362048b71235118c55 100644 (file)
@@ -323,27 +323,26 @@ struct GNUNET_MQ_MessageHandler
  *                      const struct GNUNET_MessageTest *msg)
  * { ... }
  *
- * GNUNET_MQ_hd_fixed_size(test_message,
- *                         GNUNET_MESSAGE_TYPE_TEST,
- *                         struct GNUNET_MessageTest);
  * struct GNUNET_MQ_MessageHandler handlers[] = {
- *   make_test_message_handler (NULL),
+ *   GNUNET_MQ_hd_fixed_size(test_message,
+ *                           GNUNET_MESSAGE_TYPE_TEST,
+ *                           struct GNUNET_MessageTest,
+ *                           "context"),
  *   GNUNET_MQ_handler_end()
  * };
  *
  * @param name unique basename for the functions
  * @param code message type constant
  * @param str type of the message (a struct)
+ * @param ctx context for the callbacks
  */
-#define GNUNET_MQ_hd_fixed_size(name,code,str)   \
-  struct GNUNET_MQ_MessageHandler                           \
-  make_##name##_handler (void *cls) {                        \
-    void (*cb)(void *cls, const str *msg) = &handle_##name;  \
-    struct GNUNET_MQ_MessageHandler mh = {                  \
-      NULL, (GNUNET_MQ_MessageCallback) cb,                  \
-      cls, code, sizeof (str) };                             \
-    return mh;                                               \
-  }
+#define GNUNET_MQ_hd_fixed_size(name,code,str,ctx)           \
+  ({                                                         \
+    void (*_cb)(void *cls, const str *msg) = &handle_##name; \
+    ((struct GNUNET_MQ_MessageHandler) {                     \
+      NULL, (GNUNET_MQ_MessageCallback) _cb,                 \
+      (ctx), (code), sizeof (str) });                        \
+  })
 
 
 /**
@@ -356,9 +355,6 @@ struct GNUNET_MQ_MessageHandler
  * The macro is to be used as follows:
  * <code>
  * struct GNUNET_MessageTest { ... }; // can be variable size
- * GNUNET_MQ_hd_var_size(test_message,
- *                       GNUNET_MESSAGE_TYPE_TEST,
- *                       struct GNUNET_MessageTest);
  * static int
  * check_test (void *cls,
  *             const struct GNUNET_MessageTest *msg)
@@ -377,25 +373,27 @@ struct GNUNET_MQ_MessageHandler
  * }
  *
  * struct GNUNET_MQ_MessageHandler handlers[] = {
- *   make_test_message_handler ("context"),
+ *   GNUNET_MQ_hd_var_size(test_message,
+ *                         GNUNET_MESSAGE_TYPE_TEST,
+ *                         struct GNUNET_MessageTest,
+ *                         "context"),
  *   GNUNET_MQ_handler_end()
  * };
  *
  * @param name unique basename for the functions
  * @param code message type constant
  * @param str type of the message (a struct)
- */
-#define GNUNET_MQ_hd_var_size(name,code,str)               \
-  struct GNUNET_MQ_MessageHandler                         \
-  make_##name##_handler (void *ctx) {                     \
-    int (*mv)(void *cls, const str *msg) = &check_##name;  \
-    void (*cb)(void *cls, const str *msg) = &handle_##name;\
-    struct GNUNET_MQ_MessageHandler mh =                   \
-      { (GNUNET_MQ_MessageValidationCallback) mv,          \
-       (GNUNET_MQ_MessageCallback) cb,                    \
-       ctx, code, sizeof (str) };                         \
-    return mh;                                             \
-  }
+ * @param ctx context for the callbacks
+ */
+#define GNUNET_MQ_hd_var_size(name,code,str,ctx)             \
+  ({                                                         \
+    int (*_mv)(void *cls, const str *msg) = &check_##name;   \
+    void (*_cb)(void *cls, const str *msg) = &handle_##name; \
+    ((struct GNUNET_MQ_MessageHandler)                       \
+      { (GNUNET_MQ_MessageValidationCallback) _mv,           \
+        (GNUNET_MQ_MessageCallback) _cb,                     \
+        (ctx), (code), sizeof (str) });                      \
+  })
 
 
 /**
index ad9929dca1050f51ba1b628e9e053e2dc71881dd..7cfe708359db25b447ffc246f3ffcb21ed38c69f 100644 (file)
@@ -762,32 +762,27 @@ origin_connect (struct GNUNET_MULTICAST_Origin *orig)
 {
   struct GNUNET_MULTICAST_Group *grp = &orig->grp;
 
-  GNUNET_MQ_hd_var_size (group_message,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
-                         struct GNUNET_MULTICAST_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (origin_request,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST,
-                         struct GNUNET_MULTICAST_RequestHeader);
-
-  GNUNET_MQ_hd_fixed_size (group_fragment_ack,
-                           GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (group_join_request,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
-                         struct MulticastJoinRequestMessage);
-
-  GNUNET_MQ_hd_fixed_size (group_replay_request,
-                           GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
-                           struct MulticastReplayRequestMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_group_message_handler (grp),
-    make_origin_request_handler (orig),
-    make_group_fragment_ack_handler (grp),
-    make_group_join_request_handler (grp),
-    make_group_replay_request_handler (grp),
+    GNUNET_MQ_hd_var_size (group_message,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
+                           struct GNUNET_MULTICAST_MessageHeader,
+                           grp),
+    GNUNET_MQ_hd_var_size (origin_request,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_REQUEST,
+                           struct GNUNET_MULTICAST_RequestHeader,
+                           orig),
+    GNUNET_MQ_hd_fixed_size (group_fragment_ack,
+                             GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
+                             struct GNUNET_MessageHeader,
+                             grp),
+    GNUNET_MQ_hd_var_size (group_join_request,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
+                           struct MulticastJoinRequestMessage,
+                           grp),
+    GNUNET_MQ_hd_fixed_size (group_replay_request,
+                             GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
+                             struct MulticastReplayRequestMessage,
+                             grp),
     GNUNET_MQ_handler_end ()
   };
 
@@ -1053,37 +1048,31 @@ member_connect (struct GNUNET_MULTICAST_Member *mem)
 {
   struct GNUNET_MULTICAST_Group *grp = &mem->grp;
 
-  GNUNET_MQ_hd_var_size (group_message,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
-                         struct GNUNET_MULTICAST_MessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (group_fragment_ack,
-                           GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (group_join_request,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
-                         struct MulticastJoinRequestMessage);
-
-  GNUNET_MQ_hd_var_size (member_join_decision,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION,
-                         struct MulticastJoinDecisionMessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (group_replay_request,
-                           GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
-                           struct MulticastReplayRequestMessage);
-
-  GNUNET_MQ_hd_var_size (member_replay_response,
-                         GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE,
-                         struct MulticastReplayResponseMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_group_message_handler (grp),
-    make_group_fragment_ack_handler (grp),
-    make_group_join_request_handler (grp),
-    make_member_join_decision_handler (mem),
-    make_group_replay_request_handler (grp),
-    make_member_replay_response_handler (mem),
+    GNUNET_MQ_hd_var_size (group_message,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_MESSAGE,
+                           struct GNUNET_MULTICAST_MessageHeader,
+                           grp),
+    GNUNET_MQ_hd_fixed_size (group_fragment_ack,
+                             GNUNET_MESSAGE_TYPE_MULTICAST_FRAGMENT_ACK,
+                             struct GNUNET_MessageHeader,
+                             grp),
+    GNUNET_MQ_hd_var_size (group_join_request,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_REQUEST,
+                           struct MulticastJoinRequestMessage,
+                           grp),
+    GNUNET_MQ_hd_var_size (member_join_decision,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION,
+                           struct MulticastJoinDecisionMessageHeader,
+                           mem),
+    GNUNET_MQ_hd_fixed_size (group_replay_request,
+                             GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST,
+                             struct MulticastReplayRequestMessage,
+                             grp),
+    GNUNET_MQ_hd_var_size (member_replay_response,
+                           GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_RESPONSE,
+                           struct MulticastReplayResponseMessage,
+                           mem),
     GNUNET_MQ_handler_end ()
   };
 
index 46d685a2683fd137b3551c2abd2f018a291702a1..9ccb91bc878ca4d43f4220ac7544646207590f33 100644 (file)
@@ -324,15 +324,15 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_NAMECACHE_Handle *h)
 {
-  GNUNET_MQ_hd_var_size (lookup_block_response,
-                         GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE,
-                         struct LookupBlockResponseMessage);
-  GNUNET_MQ_hd_fixed_size (block_cache_response,
-                           GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE,
-                           struct BlockCacheResponseMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_lookup_block_response_handler (h),
-    make_block_cache_response_handler (h),
+    GNUNET_MQ_hd_var_size (lookup_block_response,
+                           GNUNET_MESSAGE_TYPE_NAMECACHE_LOOKUP_BLOCK_RESPONSE,
+                           struct LookupBlockResponseMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (block_cache_response,
+                             GNUNET_MESSAGE_TYPE_NAMECACHE_BLOCK_CACHE_RESPONSE,
+                             struct BlockCacheResponseMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   GNUNET_assert (NULL == h->mq);
index 61d8385b6370dcd0f0d151d0dbd9181dbe88fb98..6dc0df6fdb3d011e52b4602b691b72df6e8e8e48 100644 (file)
@@ -783,23 +783,23 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_NAMESTORE_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (record_store_response,
-                           GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE,
-                           struct RecordStoreResponseMessage);
-  GNUNET_MQ_hd_var_size (zone_to_name_response,
-                         GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE,
-                         struct ZoneToNameResponseMessage);
-  GNUNET_MQ_hd_var_size (record_result,
-                         GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
-                         struct RecordResultMessage);
-  GNUNET_MQ_hd_var_size (lookup_result,
-                         GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE,
-                         struct LabelLookupResponseMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_record_store_response_handler (h),
-    make_zone_to_name_response_handler (h),
-    make_record_result_handler (h),
-    make_lookup_result_handler (h),
+    GNUNET_MQ_hd_fixed_size (record_store_response,
+                             GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE,
+                             struct RecordStoreResponseMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (zone_to_name_response,
+                           GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE,
+                           struct ZoneToNameResponseMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (record_result,
+                           GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
+                           struct RecordResultMessage,
+                           h),
+    GNUNET_MQ_hd_var_size (lookup_result,
+                           GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE,
+                           struct LabelLookupResponseMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_NAMESTORE_ZoneIterator *it;
index 7e75b07e54f4b3f938a82e34eae74ade85db6cc3..00f0887d47bfd1287325515c20f79aeb7434a678 100644 (file)
@@ -243,15 +243,15 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_NAMESTORE_ZoneMonitor *zm)
 {
-  GNUNET_MQ_hd_fixed_size (sync,
-                           GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (result,
-                         GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
-                         struct RecordResultMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_sync_handler (zm),
-    make_result_handler (zm),
+    GNUNET_MQ_hd_fixed_size (sync,
+                             GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_SYNC,
+                             struct GNUNET_MessageHeader,
+                             zm),
+    GNUNET_MQ_hd_var_size (result,
+                           GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT,
+                           struct RecordResultMessage,
+                           zm),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 2b6780c088a6934ddcb8bc5dec81d2edc658f505..1f06c0a7571a4c173793cfc3dda5f5dd483faf10 100644 (file)
@@ -1484,16 +1484,16 @@ run (void *cls,
      struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  GNUNET_MQ_hd_fixed_size (p2p_estimate,
-                          GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD,
-                          struct GNUNET_NSE_FloodMessage);
   static const struct GNUNET_SERVER_MessageHandler handlers[] = {
     {&handle_start_message, NULL, GNUNET_MESSAGE_TYPE_NSE_START,
      sizeof (struct GNUNET_MessageHeader)},
     {NULL, NULL, 0, 0}
   };
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_p2p_estimate_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (p2p_estimate,
+                             GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD,
+                             struct GNUNET_NSE_FloodMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
   char *proof;
index e9b704be9bd2747b15dc96ca826f3f10c390fe62..cfe5482ebe802ca04208ba005ccf3012afb8398d 100644 (file)
@@ -135,12 +135,12 @@ handle_estimate (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_fixed_size (estimate,
-                           GNUNET_MESSAGE_TYPE_NSE_ESTIMATE,
-                           struct GNUNET_NSE_ClientMessage);
   struct GNUNET_NSE_Handle *h = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_estimate_handler (h),
+    GNUNET_MQ_hd_fixed_size (estimate,
+                             GNUNET_MESSAGE_TYPE_NSE_ESTIMATE,
+                             struct GNUNET_NSE_ClientMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *msg;
index e477186ee1522ca4a6c8a87348ff5eb8a6290687..3080fb5036ebaeeaca1b9cab0492d16f586e9694 100644 (file)
@@ -440,15 +440,15 @@ handle_end_iteration (void *cls,
 static void
 reconnect (struct GNUNET_PEERINFO_Handle *h)
 {
-  GNUNET_MQ_hd_var_size (info,
-                         GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
-                         struct InfoMessage);
-  GNUNET_MQ_hd_fixed_size (end_iteration,
-                           GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_info_handler (h),
-    make_end_iteration_handler (h),
+    GNUNET_MQ_hd_var_size (info,
+                           GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
+                           struct InfoMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (end_iteration,
+                             GNUNET_MESSAGE_TYPE_PEERINFO_INFO_END,
+                             struct GNUNET_MessageHeader,
+                             h),
     GNUNET_MQ_handler_end ()
   };
 
index c3dac50641f2e9c69f97775799a04398b7d14609..625cfb8f6241e45e84836c3622cca68fdec0cd62 100644 (file)
@@ -179,12 +179,12 @@ handle_notification (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (notification,
-                         GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
-                         struct InfoMessage);
   struct GNUNET_PEERINFO_NotifyContext *nc = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_notification_handler (nc),
+    GNUNET_MQ_hd_var_size (notification,
+                           GNUNET_MESSAGE_TYPE_PEERINFO_INFO,
+                           struct InfoMessage,
+                           nc),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index a288e74d2df162c279929a67aa5807294b4d1194..f6910c017a1382a87399a3da384f97ba6268cfe0 100644 (file)
@@ -786,19 +786,19 @@ handle_watch_record (void *cls,
 static void
 reconnect (struct GNUNET_PEERSTORE_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (iterate_end,
-                           GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (iterate_result,
-                         GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD,
-                         struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (watch_record,
-                         GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD,
-                         struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_iterate_end_handler (h),
-    make_iterate_result_handler (h),
-    make_watch_record_handler (h),
+    GNUNET_MQ_hd_fixed_size (iterate_end,
+                             GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_END,
+                             struct GNUNET_MessageHeader,
+                             h),
+    GNUNET_MQ_hd_var_size (iterate_result,
+                           GNUNET_MESSAGE_TYPE_PEERSTORE_ITERATE_RECORD,
+                           struct GNUNET_MessageHeader,
+                           h),
+    GNUNET_MQ_hd_var_size (watch_record,
+                           GNUNET_MESSAGE_TYPE_PEERSTORE_WATCH_RECORD,
+                           struct GNUNET_MessageHeader,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_PEERSTORE_IterateContext *ic;
index 8e960c7be4e290ee7f8436bb0402f2ee65bbe84b..45e4135a321de9ea0fbf76a27555777db5afa9c2 100644 (file)
@@ -642,42 +642,35 @@ master_connect (struct GNUNET_PSYC_Master *mst)
 {
   struct GNUNET_PSYC_Channel *chn = &mst->chn;
 
-  GNUNET_MQ_hd_fixed_size (master_start_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK,
-                           struct GNUNET_PSYC_CountersResultMessage);
-
-  GNUNET_MQ_hd_var_size (master_join_request,
-                         GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
-                         struct GNUNET_PSYC_JoinRequestMessage);
-
-  GNUNET_MQ_hd_var_size (channel_message,
-                         GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
-                         struct GNUNET_PSYC_MessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (channel_message_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (channel_history_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (channel_state_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (channel_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
-                         struct GNUNET_OperationResultMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_master_start_ack_handler (mst),
-    make_master_join_request_handler (mst),
-    make_channel_message_handler (chn),
-    make_channel_message_ack_handler (chn),
-    make_channel_history_result_handler (chn),
-    make_channel_state_result_handler (chn),
-    make_channel_result_handler (chn),
+    GNUNET_MQ_hd_fixed_size (master_start_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK,
+                             struct GNUNET_PSYC_CountersResultMessage,
+                             mst),
+    GNUNET_MQ_hd_var_size (master_join_request,
+                           GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
+                           struct GNUNET_PSYC_JoinRequestMessage,
+                           mst),
+    GNUNET_MQ_hd_var_size (channel_message,
+                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+                           struct GNUNET_PSYC_MessageHeader,
+                           chn),
+    GNUNET_MQ_hd_fixed_size (channel_message_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+                             struct GNUNET_MessageHeader,
+                             chn),
+    GNUNET_MQ_hd_var_size (channel_history_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
+    GNUNET_MQ_hd_var_size (channel_state_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
+    GNUNET_MQ_hd_var_size (channel_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
     GNUNET_MQ_handler_end ()
   };
 
@@ -948,42 +941,35 @@ slave_connect (struct GNUNET_PSYC_Slave *slv)
 {
   struct GNUNET_PSYC_Channel *chn = &slv->chn;
 
-  GNUNET_MQ_hd_fixed_size (slave_join_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK,
-                           struct GNUNET_PSYC_CountersResultMessage);
-
-  GNUNET_MQ_hd_var_size (slave_join_decision,
-                         GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
-                         struct GNUNET_PSYC_JoinDecisionMessage);
-
-  GNUNET_MQ_hd_var_size (channel_message,
-                         GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
-                         struct GNUNET_PSYC_MessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (channel_message_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (channel_history_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (channel_state_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (channel_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
-                         struct GNUNET_OperationResultMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_slave_join_ack_handler (slv),
-    make_slave_join_decision_handler (slv),
-    make_channel_message_handler (chn),
-    make_channel_message_ack_handler (chn),
-    make_channel_history_result_handler (chn),
-    make_channel_state_result_handler (chn),
-    make_channel_result_handler (chn),
+    GNUNET_MQ_hd_fixed_size (slave_join_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK,
+                             struct GNUNET_PSYC_CountersResultMessage,
+                             slv),
+    GNUNET_MQ_hd_var_size (slave_join_decision,
+                           GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
+                           struct GNUNET_PSYC_JoinDecisionMessage,
+                           slv),
+    GNUNET_MQ_hd_var_size (channel_message,
+                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+                           struct GNUNET_PSYC_MessageHeader,
+                           chn),
+    GNUNET_MQ_hd_fixed_size (channel_message_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+                             struct GNUNET_MessageHeader,
+                             chn),
+    GNUNET_MQ_hd_var_size (channel_history_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
+    GNUNET_MQ_hd_var_size (channel_state_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
+    GNUNET_MQ_hd_var_size (channel_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+                           struct GNUNET_OperationResultMessage,
+                           chn),
     GNUNET_MQ_handler_end ()
   };
 
index 89be19a4259161522548701f516b47be16cc5253..7bbf2e3d8f9d179f634448ffee08012348dec297 100644 (file)
@@ -323,27 +323,23 @@ do_connect (struct GNUNET_PSYCSTORE_Handle *h)
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Connecting to PSYCstore service.\n");
 
-  GNUNET_MQ_hd_var_size (result_code,
-                         GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE,
-                         struct OperationResult);
-
-  GNUNET_MQ_hd_fixed_size (result_counters,
-                           GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS,
-                           struct CountersResult);
-
-  GNUNET_MQ_hd_var_size (result_fragment,
-                         GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT,
-                         struct FragmentResult);
-
-  GNUNET_MQ_hd_var_size (result_state,
-                         GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE,
-                         struct StateResult);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_result_code_handler (h),
-    make_result_counters_handler (h),
-    make_result_fragment_handler (h),
-    make_result_state_handler (h),
+    GNUNET_MQ_hd_var_size (result_code,
+                           GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_CODE,
+                           struct OperationResult,
+                           h),
+    GNUNET_MQ_hd_fixed_size (result_counters,
+                             GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_COUNTERS,
+                             struct CountersResult,
+                             h),
+    GNUNET_MQ_hd_var_size (result_fragment,
+                           GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_FRAGMENT,
+                           struct FragmentResult,
+                           h),
+    GNUNET_MQ_hd_var_size (result_state,
+                           GNUNET_MESSAGE_TYPE_PSYCSTORE_RESULT_STATE,
+                           struct StateResult,
+                           h),
     GNUNET_MQ_handler_end ()
   };
 
index 84a58f367f4547f5ef9db6baf80d7566f09ec68f..ff85f57485aa5d9f84ac941f6f279669cbda86c4 100644 (file)
@@ -155,11 +155,11 @@ mq_error_handler (void *cls,
 static void
 search_reconnect (struct GNUNET_REGEX_Search *s)
 {
-  GNUNET_MQ_hd_var_size (search_response,
-                         GNUNET_MESSAGE_TYPE_REGEX_RESULT,
-                         struct ResultMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_search_response_handler (s),
+    GNUNET_MQ_hd_var_size (search_response,
+                           GNUNET_MESSAGE_TYPE_REGEX_RESULT,
+                           struct ResultMessage,
+                           s),
     GNUNET_MQ_handler_end ()
   };
   size_t slen = strlen (s->string) + 1;
index 0f67977a113608d12926ef8d7441fd8d242b773d..706432ecec7bb1d20604e553ff656c0249ba0740 100644 (file)
@@ -777,9 +777,6 @@ run (void *cls,
      struct GNUNET_SERVER_Handle *server,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  GNUNET_MQ_hd_fixed_size (p2p_revoke,
-                          GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
-                          struct RevokeMessage);
   static const struct GNUNET_SERVER_MessageHandler handlers[] = {
     {&handle_query_message, NULL, GNUNET_MESSAGE_TYPE_REVOCATION_QUERY,
      sizeof (struct QueryMessage)},
@@ -788,7 +785,10 @@ run (void *cls,
     {NULL, NULL, 0, 0}
   };
   struct GNUNET_MQ_MessageHandler core_handlers[] = {
-    make_p2p_revoke_handler (NULL),
+    GNUNET_MQ_hd_fixed_size (p2p_revoke,
+                             GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE,
+                             struct RevokeMessage,
+                             NULL),
     GNUNET_MQ_handler_end ()
   };
   char *fn;
index 0b9bc4ea64c6234d0b521e2f9d53e35842762c32..8c00ac2ae680bbef1d76647fe2291354fde7f25a 100644 (file)
@@ -113,13 +113,13 @@ GNUNET_REVOCATION_query (const struct GNUNET_CONFIGURATION_Handle *cfg,
                         GNUNET_REVOCATION_Callback func,
                          void *func_cls)
 {
-  GNUNET_MQ_hd_fixed_size (revocation_query_response,
-                           GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE,
-                           struct QueryResponseMessage);
   struct GNUNET_REVOCATION_Query *q
     = GNUNET_new (struct GNUNET_REVOCATION_Query);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_revocation_query_response_handler (q),
+    GNUNET_MQ_hd_fixed_size (revocation_query_response,
+                             GNUNET_MESSAGE_TYPE_REVOCATION_QUERY_RESPONSE,
+                             struct QueryResponseMessage,
+                             q),
     GNUNET_MQ_handler_end ()
   };
   struct QueryMessage *qm;
@@ -255,13 +255,13 @@ GNUNET_REVOCATION_revoke (const struct GNUNET_CONFIGURATION_Handle *cfg,
                          GNUNET_REVOCATION_Callback func,
                           void *func_cls)
 {
-  GNUNET_MQ_hd_fixed_size (revocation_response,
-                           GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE,
-                           struct RevocationResponseMessage);
   struct GNUNET_REVOCATION_Handle *h
     = GNUNET_new (struct GNUNET_REVOCATION_Handle);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_revocation_response_handler (h),
+    GNUNET_MQ_hd_fixed_size (revocation_response,
+                             GNUNET_MESSAGE_TYPE_REVOCATION_REVOKE_RESPONSE,
+                             struct RevocationResponseMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   unsigned long long matching_bits;
index 39fb0168bc39ada74ed06225163224ccee8ed01a..c04056c58691987cb4bcb96592b862669135790b 100644 (file)
@@ -211,11 +211,11 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_RPS_Handle *h)
 {
-  GNUNET_MQ_hd_var_size (reply,
-                         GNUNET_MESSAGE_TYPE_RPS_CS_REPLY,
-                         struct GNUNET_RPS_CS_ReplyMessage);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_reply_handler (h),
+    GNUNET_MQ_hd_var_size (reply,
+                           GNUNET_MESSAGE_TYPE_RPS_CS_REPLY,
+                           struct GNUNET_RPS_CS_ReplyMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
 
index 09e06d5a02ad597ce4a7fd37a5ea09bea872aac9..5ad64f4be95dcdeda55712db76f2add2bcdbd551 100644 (file)
@@ -230,13 +230,13 @@ GNUNET_SCALARPRODUCT_accept_computation (const struct GNUNET_CONFIGURATION_Handl
                                          GNUNET_SCALARPRODUCT_ContinuationWithStatus cont,
                                          void *cont_cls)
 {
-  GNUNET_MQ_hd_var_size (response,
-                        GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
-                        struct ClientResponseMessage);
   struct GNUNET_SCALARPRODUCT_ComputationHandle *h
     = GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_response_handler (h),
+    GNUNET_MQ_hd_var_size (response,
+                           GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+                           struct ClientResponseMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
@@ -388,13 +388,13 @@ GNUNET_SCALARPRODUCT_start_computation (const struct GNUNET_CONFIGURATION_Handle
                                         GNUNET_SCALARPRODUCT_DatumProcessor cont,
                                         void *cont_cls)
 {
-  GNUNET_MQ_hd_var_size (response,
-                        GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
-                        struct ClientResponseMessage);
   struct GNUNET_SCALARPRODUCT_ComputationHandle *h
     = GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_response_handler (h),
+    GNUNET_MQ_hd_var_size (response,
+                           GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+                           struct ClientResponseMessage,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 429aec47eee2feb4feeb820387197fd52efb420e..78167b671a5cf1cdb8ed8b70a726cbf5d2fbf20c 100644 (file)
@@ -249,13 +249,13 @@ GNUNET_SECRETSHARING_create_session (const struct GNUNET_CONFIGURATION_Handle *c
                                      GNUNET_SECRETSHARING_SecretReadyCallback cb,
                                      void *cls)
 {
-  GNUNET_MQ_hd_var_size (secret_ready,
-                         GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY,
-                         struct GNUNET_SECRETSHARING_SecretReadyMessage);
   struct GNUNET_SECRETSHARING_Session *s
     = GNUNET_new (struct GNUNET_SECRETSHARING_Session);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_secret_ready_handler (s),
+    GNUNET_MQ_hd_var_size (secret_ready,
+                           GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_SECRET_READY,
+                           struct GNUNET_SECRETSHARING_SecretReadyMessage,
+                           s),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *ev;
@@ -333,13 +333,13 @@ GNUNET_SECRETSHARING_decrypt (const struct GNUNET_CONFIGURATION_Handle *cfg,
                               GNUNET_SECRETSHARING_DecryptCallback decrypt_cb,
                               void *decrypt_cb_cls)
 {
-  GNUNET_MQ_hd_fixed_size (decrypt_done,
-                           GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT_DONE,
-                           struct GNUNET_SECRETSHARING_DecryptResponseMessage);
   struct GNUNET_SECRETSHARING_DecryptionHandle *s
     = GNUNET_new (struct GNUNET_SECRETSHARING_DecryptionHandle);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_decrypt_done_handler (s),
+    GNUNET_MQ_hd_fixed_size (decrypt_done,
+                             GNUNET_MESSAGE_TYPE_SECRETSHARING_CLIENT_DECRYPT_DONE,
+                             struct GNUNET_SECRETSHARING_DecryptResponseMessage,
+                             s),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *ev;
index 3e9a4fdcfdb0d917d9d168eb2e9a597f68486dda..7a33b86eaeb8d210ada05c1ec7f1ff0db9d5fa25 100644 (file)
@@ -561,24 +561,24 @@ create_internal (const struct GNUNET_CONFIGURATION_Handle *cfg,
                  enum GNUNET_SET_OperationType op,
                  const uint32_t *cookie)
 {
-  GNUNET_MQ_hd_var_size (result,
-                        GNUNET_MESSAGE_TYPE_SET_RESULT,
-                        struct GNUNET_SET_ResultMessage);
-  GNUNET_MQ_hd_var_size (iter_element,
-                        GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT,
-                        struct GNUNET_SET_IterResponseMessage);
-  GNUNET_MQ_hd_fixed_size (iter_done,
-                          GNUNET_MESSAGE_TYPE_SET_ITER_DONE,
-                          struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_fixed_size (copy_lazy,
-                          GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_RESPONSE,
-                          struct GNUNET_SET_CopyLazyResponseMessage);
   struct GNUNET_SET_Handle *set = GNUNET_new (struct GNUNET_SET_Handle);
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_result_handler (set),
-    make_iter_element_handler (set),
-    make_iter_done_handler (set),
-    make_copy_lazy_handler (set),
+    GNUNET_MQ_hd_var_size (result,
+                           GNUNET_MESSAGE_TYPE_SET_RESULT,
+                           struct GNUNET_SET_ResultMessage,
+                           set),
+    GNUNET_MQ_hd_var_size (iter_element,
+                           GNUNET_MESSAGE_TYPE_SET_ITER_ELEMENT,
+                           struct GNUNET_SET_IterResponseMessage,
+                           set),
+    GNUNET_MQ_hd_fixed_size (iter_done,
+                             GNUNET_MESSAGE_TYPE_SET_ITER_DONE,
+                             struct GNUNET_MessageHeader,
+                             set),
+    GNUNET_MQ_hd_fixed_size (copy_lazy,
+                             GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_RESPONSE,
+                             struct GNUNET_SET_CopyLazyResponseMessage,
+                             set),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *mqm;
@@ -901,12 +901,12 @@ handle_client_listener_error (void *cls,
 static void
 listen_connect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (request,
-                        GNUNET_MESSAGE_TYPE_SET_REQUEST,
-                        struct GNUNET_SET_RequestMessage);
   struct GNUNET_SET_ListenHandle *lh = cls;
   struct GNUNET_MQ_MessageHandler mq_handlers[] = {
-    make_request_handler (lh),
+    GNUNET_MQ_hd_var_size (request,
+                           GNUNET_MESSAGE_TYPE_SET_REQUEST,
+                           struct GNUNET_SET_RequestMessage,
+                           lh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *mqm;
index c08de0356532a1563bbfa53f3d6498fd093e9a66..583ce6d1e7889ad1b28ef85f32c92fb9bded745c 100644 (file)
@@ -1155,42 +1155,35 @@ host_connect (struct GNUNET_SOCIAL_Host *hst)
 {
   struct GNUNET_SOCIAL_Place *plc = &hst->plc;
 
-  GNUNET_MQ_hd_fixed_size (host_enter_ack,
-                           GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK,
-                           struct HostEnterAck);
-
-  GNUNET_MQ_hd_var_size (host_enter_request,
-                         GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
-                         struct GNUNET_PSYC_JoinRequestMessage);
-
-  GNUNET_MQ_hd_var_size (host_message,
-                         GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
-                         struct GNUNET_PSYC_MessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (place_message_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (place_history_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (place_state_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (place_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
-                         struct GNUNET_OperationResultMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_host_enter_ack_handler (hst),
-    make_host_enter_request_handler (hst),
-    make_host_message_handler (plc),
-    make_place_message_ack_handler (plc),
-    make_place_history_result_handler (plc),
-    make_place_state_result_handler (plc),
-    make_place_result_handler (plc),
+    GNUNET_MQ_hd_fixed_size (host_enter_ack,
+                             GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK,
+                             struct HostEnterAck,
+                             hst),
+    GNUNET_MQ_hd_var_size (host_enter_request,
+                           GNUNET_MESSAGE_TYPE_PSYC_JOIN_REQUEST,
+                           struct GNUNET_PSYC_JoinRequestMessage,
+                           hst),
+    GNUNET_MQ_hd_var_size (host_message,
+                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+                           struct GNUNET_PSYC_MessageHeader,
+                           hst),
+    GNUNET_MQ_hd_fixed_size (place_message_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+                             struct GNUNET_MessageHeader,
+                             plc),
+    GNUNET_MQ_hd_var_size (place_history_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
+    GNUNET_MQ_hd_var_size (place_state_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
+    GNUNET_MQ_hd_var_size (place_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
     GNUNET_MQ_handler_end ()
   };
 
@@ -1664,42 +1657,35 @@ guest_connect (struct GNUNET_SOCIAL_Guest *gst)
 {
   struct GNUNET_SOCIAL_Place *plc = &gst->plc;
 
-  GNUNET_MQ_hd_fixed_size (guest_enter_ack,
-                           GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK,
-                           struct GNUNET_PSYC_CountersResultMessage);
-
-  GNUNET_MQ_hd_var_size (guest_enter_decision,
-                         GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
-                         struct GNUNET_PSYC_JoinDecisionMessage);
-
-  GNUNET_MQ_hd_var_size (place_message,
-                         GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
-                         struct GNUNET_PSYC_MessageHeader);
-
-  GNUNET_MQ_hd_fixed_size (place_message_ack,
-                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (place_history_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (place_state_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
-                         struct GNUNET_OperationResultMessage);
-
-  GNUNET_MQ_hd_var_size (place_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
-                         struct GNUNET_OperationResultMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_guest_enter_ack_handler (gst),
-    make_guest_enter_decision_handler (gst),
-    make_place_message_handler (plc),
-    make_place_message_ack_handler (plc),
-    make_place_history_result_handler (plc),
-    make_place_state_result_handler (plc),
-    make_place_result_handler (plc),
+    GNUNET_MQ_hd_fixed_size (guest_enter_ack,
+                             GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK,
+                             struct GNUNET_PSYC_CountersResultMessage,
+                             gst),
+    GNUNET_MQ_hd_var_size (guest_enter_decision,
+                           GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION,
+                           struct GNUNET_PSYC_JoinDecisionMessage,
+                           gst),
+    GNUNET_MQ_hd_var_size (place_message,
+                           GNUNET_MESSAGE_TYPE_PSYC_MESSAGE,
+                           struct GNUNET_PSYC_MessageHeader,
+                           plc),
+    GNUNET_MQ_hd_fixed_size (place_message_ack,
+                             GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_ACK,
+                             struct GNUNET_MessageHeader,
+                             plc),
+    GNUNET_MQ_hd_var_size (place_history_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
+    GNUNET_MQ_hd_var_size (place_state_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_STATE_RESULT,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
+    GNUNET_MQ_hd_var_size (place_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+                           struct GNUNET_OperationResultMessage,
+                           plc),
     GNUNET_MQ_handler_end ()
   };
 
@@ -2579,32 +2565,27 @@ app_disconnected (void *cls, enum GNUNET_MQ_Error error)
 static void
 app_connect (struct GNUNET_SOCIAL_App *app)
 {
-  GNUNET_MQ_hd_var_size (app_ego,
-                         GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO,
-                         struct AppEgoMessage);
-
-  GNUNET_MQ_hd_fixed_size (app_ego_end,
-                           GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (app_place,
-                         GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE,
-                         struct AppPlaceMessage);
-
-  GNUNET_MQ_hd_fixed_size (app_place_end,
-                           GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END,
-                           struct GNUNET_MessageHeader);
-
-  GNUNET_MQ_hd_var_size (app_result,
-                         GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
-                         struct GNUNET_OperationResultMessage);
-
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_app_ego_handler (app),
-    make_app_ego_end_handler (app),
-    make_app_place_handler (app),
-    make_app_place_end_handler (app),
-    make_app_result_handler (app),
+    GNUNET_MQ_hd_var_size (app_ego,
+                           GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO,
+                           struct AppEgoMessage,
+                           app),
+    GNUNET_MQ_hd_fixed_size (app_ego_end,
+                             GNUNET_MESSAGE_TYPE_SOCIAL_APP_EGO_END,
+                             struct GNUNET_MessageHeader,
+                             app),
+    GNUNET_MQ_hd_var_size (app_place,
+                           GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE,
+                           struct AppPlaceMessage,
+                           app),
+    GNUNET_MQ_hd_fixed_size (app_place_end,
+                             GNUNET_MESSAGE_TYPE_SOCIAL_APP_PLACE_END,
+                             struct GNUNET_MessageHeader,
+                             app),
+    GNUNET_MQ_hd_var_size (app_result,
+                           GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE,
+                           struct GNUNET_OperationResultMessage,
+                           app),
     GNUNET_MQ_handler_end ()
   };
 
index 7f5a257d97418b5adf1643630b99d8140dfd9c57..acaa1cc45661482d786a056e35ad56af3dd31a26 100644 (file)
@@ -646,23 +646,23 @@ handle_statistics_end (void *cls,
 static int
 try_connect (struct GNUNET_STATISTICS_Handle *h)
 {
-  GNUNET_MQ_hd_fixed_size (test,
-                           GNUNET_MESSAGE_TYPE_TEST,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_fixed_size (statistics_end,
-                           GNUNET_MESSAGE_TYPE_STATISTICS_END,
-                           struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_var_size (statistics_value,
-                         GNUNET_MESSAGE_TYPE_STATISTICS_VALUE,
-                         struct GNUNET_STATISTICS_ReplyMessage);
-  GNUNET_MQ_hd_fixed_size (statistics_watch_value,
-                           GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE,
-                           struct GNUNET_STATISTICS_WatchValueMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_test_handler (h),
-    make_statistics_end_handler (h),
-    make_statistics_value_handler (h),
-    make_statistics_watch_value_handler (h),
+    GNUNET_MQ_hd_fixed_size (test,
+                             GNUNET_MESSAGE_TYPE_TEST,
+                             struct GNUNET_MessageHeader,
+                             h),
+    GNUNET_MQ_hd_fixed_size (statistics_end,
+                             GNUNET_MESSAGE_TYPE_STATISTICS_END,
+                             struct GNUNET_MessageHeader,
+                             h),
+    GNUNET_MQ_hd_var_size (statistics_value,
+                           GNUNET_MESSAGE_TYPE_STATISTICS_VALUE,
+                           struct GNUNET_STATISTICS_ReplyMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (statistics_watch_value,
+                             GNUNET_MESSAGE_TYPE_STATISTICS_WATCH_VALUE,
+                             struct GNUNET_STATISTICS_WatchValueMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_STATISTICS_GetHandle *gh;
index 895800514f7e19ded92e2fcde3643ecf9c2ad895..53f70a1c09b2e8072bbb2beaed148ab7b2bd3194 100644 (file)
@@ -1549,49 +1549,49 @@ GNUNET_TESTBED_controller_connect (struct GNUNET_TESTBED_Host *host,
                                    GNUNET_TESTBED_ControllerCallback cc,
                                    void *cc_cls)
 {
-  GNUNET_MQ_hd_var_size (add_host_confirm,
-                         GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS,
-                         struct GNUNET_TESTBED_HostConfirmedMessage);
-  GNUNET_MQ_hd_fixed_size (peer_conevent,
-                           GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT,
-                           struct GNUNET_TESTBED_ConnectionEventMessage);
-  GNUNET_MQ_hd_fixed_size (opsuccess,
-                           GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS,
-                           struct GNUNET_TESTBED_GenericOperationSuccessEventMessage);
-  GNUNET_MQ_hd_var_size (op_fail_event,
-                         GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT,
-                         struct GNUNET_TESTBED_OperationFailureEventMessage);
-  GNUNET_MQ_hd_fixed_size (peer_create_success,
-                           GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS,
-                           struct GNUNET_TESTBED_PeerCreateSuccessEventMessage);
-  GNUNET_MQ_hd_fixed_size (peer_event,
-                           GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT,
-                           struct GNUNET_TESTBED_PeerEventMessage);
-  GNUNET_MQ_hd_var_size (peer_config,
-                         GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION,
-                         struct GNUNET_TESTBED_PeerConfigurationInformationMessage);
-  GNUNET_MQ_hd_var_size (slave_config,
-                         GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION,
-                         struct GNUNET_TESTBED_SlaveConfiguration);
-  GNUNET_MQ_hd_var_size (link_controllers_result,
-                         GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT,
-                         struct GNUNET_TESTBED_ControllerLinkResponse);
-  GNUNET_MQ_hd_var_size (barrier_status,
-                         GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
-                         const struct GNUNET_TESTBED_BarrierStatusMsg);
   struct GNUNET_TESTBED_Controller *controller
     = GNUNET_new (struct GNUNET_TESTBED_Controller);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_add_host_confirm_handler (controller),
-    make_peer_conevent_handler (controller),
-    make_opsuccess_handler (controller),
-    make_op_fail_event_handler (controller),
-    make_peer_create_success_handler (controller),
-    make_peer_event_handler (controller),
-    make_peer_config_handler (controller),
-    make_slave_config_handler (controller),
-    make_link_controllers_result_handler (controller),
-    make_barrier_status_handler (controller),
+    GNUNET_MQ_hd_var_size (add_host_confirm,
+                           GNUNET_MESSAGE_TYPE_TESTBED_ADD_HOST_SUCCESS,
+                           struct GNUNET_TESTBED_HostConfirmedMessage,
+                           controller),
+    GNUNET_MQ_hd_fixed_size (peer_conevent,
+                             GNUNET_MESSAGE_TYPE_TESTBED_PEER_CONNECT_EVENT,
+                             struct GNUNET_TESTBED_ConnectionEventMessage,
+                             controller),
+    GNUNET_MQ_hd_fixed_size (opsuccess,
+                             GNUNET_MESSAGE_TYPE_TESTBED_GENERIC_OPERATION_SUCCESS,
+                             struct GNUNET_TESTBED_GenericOperationSuccessEventMessage,
+                             controller),
+    GNUNET_MQ_hd_var_size (op_fail_event,
+                           GNUNET_MESSAGE_TYPE_TESTBED_OPERATION_FAIL_EVENT,
+                           struct GNUNET_TESTBED_OperationFailureEventMessage,
+                           controller),
+    GNUNET_MQ_hd_fixed_size (peer_create_success,
+                             GNUNET_MESSAGE_TYPE_TESTBED_CREATE_PEER_SUCCESS,
+                             struct GNUNET_TESTBED_PeerCreateSuccessEventMessage,
+                             controller),
+    GNUNET_MQ_hd_fixed_size (peer_event,
+                             GNUNET_MESSAGE_TYPE_TESTBED_PEER_EVENT,
+                             struct GNUNET_TESTBED_PeerEventMessage,
+                             controller),
+    GNUNET_MQ_hd_var_size (peer_config,
+                           GNUNET_MESSAGE_TYPE_TESTBED_PEER_INFORMATION,
+                           struct GNUNET_TESTBED_PeerConfigurationInformationMessage,
+                           controller),
+    GNUNET_MQ_hd_var_size (slave_config,
+                           GNUNET_MESSAGE_TYPE_TESTBED_SLAVE_CONFIGURATION,
+                           struct GNUNET_TESTBED_SlaveConfiguration,
+                           controller),
+    GNUNET_MQ_hd_var_size (link_controllers_result,
+                           GNUNET_MESSAGE_TYPE_TESTBED_LINK_CONTROLLERS_RESULT,
+                           struct GNUNET_TESTBED_ControllerLinkResponse,
+                           controller),
+    GNUNET_MQ_hd_var_size (barrier_status,
+                           GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
+                           const struct GNUNET_TESTBED_BarrierStatusMsg,
+                           controller),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_TESTBED_InitMessage *msg;
index ee75e515c45653d6dc1510a67f4d3c68685c7261..3761fbbdf567cda658832443f6acb2421fdbf175 100644 (file)
@@ -171,13 +171,13 @@ GNUNET_TESTBED_barrier_wait (const char *name,
                              GNUNET_TESTBED_barrier_wait_cb cb,
                              void *cb_cls)
 {
-  GNUNET_MQ_hd_var_size (status,
-                         GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
-                         struct GNUNET_TESTBED_BarrierStatusMsg);
   struct GNUNET_TESTBED_BarrierWaitHandle *h
     = GNUNET_new (struct GNUNET_TESTBED_BarrierWaitHandle);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_status_handler (h),
+    GNUNET_MQ_hd_var_size (status,
+                           GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS,
+                           struct GNUNET_TESTBED_BarrierStatusMsg,
+                           h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index f56cd4bc805995809c4a4aa26b15d65e261c91a9..69f01e0431ac9ed28a83c04b1822661b957ae58f 100644 (file)
@@ -1147,11 +1147,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *c)
 {
-  GNUNET_MQ_hd_var_size (hello,
-                        GNUNET_MESSAGE_TYPE_HELLO,
-                        struct GNUNET_HELLO_Message);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_hello_handler (NULL),
+    GNUNET_MQ_hd_var_size (hello,
+                           GNUNET_MESSAGE_TYPE_HELLO,
+                           struct GNUNET_HELLO_Message,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   unsigned long long opt;
index 6e2ac61213fbc9582f98f510a68c47b2dd75097c..dceff7e3bab7e3d0809f3b4a118ff3c68d800e2f 100644 (file)
@@ -509,11 +509,11 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *mycfg)
 {
-  GNUNET_MQ_hd_var_size (dummy,
-                         GNUNET_MESSAGE_TYPE_DUMMY,
-                         struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_dummy_handler (NULL),
+    GNUNET_MQ_hd_var_size (dummy,
+                           GNUNET_MESSAGE_TYPE_DUMMY,
+                           struct GNUNET_MessageHeader,
+                           NULL),
     GNUNET_MQ_handler_end ()
   };
   
index fc0eada7a527c605e626f0c395470b3c2b849450..aceaceb87388cf338ef35845c68bed5bfe5c2c89 100644 (file)
@@ -1517,9 +1517,6 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *mycfg)
 {
-  GNUNET_MQ_hd_var_size (dummy,
-                         GNUNET_MESSAGE_TYPE_DUMMY,
-                         struct GNUNET_MessageHeader);
   int counter = 0;
   ret = 1;
 
@@ -1630,7 +1627,10 @@ run (void *cls,
   else if (benchmark_receive) /* -b: Benchmark receiving */
   {
     struct GNUNET_MQ_MessageHandler handlers[] = {
-      make_dummy_handler (NULL),
+      GNUNET_MQ_hd_var_size (dummy,
+                             GNUNET_MESSAGE_TYPE_DUMMY,
+                             struct GNUNET_MessageHeader,
+                             NULL),
       GNUNET_MQ_handler_end ()
     };
     
index bba37eee87f61fcf0eda1480436876f54cbb0fed..a79d81cb9b302218a9bd21ab6a32bab760d7f79d 100644 (file)
@@ -442,12 +442,6 @@ connect_check_run (void *cls,
                    const char *cfgfile,
                    const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_MQ_hd_var_size (test,
-                        GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE,
-                        struct GNUNET_TRANSPORT_TESTING_TestMessage);
-  GNUNET_MQ_hd_var_size (test2,
-                        GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2,
-                        struct GNUNET_TRANSPORT_TESTING_TestMessage);
   struct GNUNET_TRANSPORT_TESTING_ConnectCheckContext *ccc = cls;
   int ok;
 
@@ -461,8 +455,14 @@ connect_check_run (void *cls,
   for (unsigned int i=0;i<ccc->num_peers;i++)
   {
     struct GNUNET_MQ_MessageHandler handlers[] = {
-      make_test_handler (NULL),
-      make_test2_handler (NULL),
+      GNUNET_MQ_hd_var_size (test,
+                             GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE,
+                             struct GNUNET_TRANSPORT_TESTING_TestMessage,
+                             NULL),
+      GNUNET_MQ_hd_var_size (test2,
+                             GNUNET_TRANSPORT_TESTING_SIMPLE_MTYPE2,
+                             struct GNUNET_TRANSPORT_TESTING_TestMessage,
+                             NULL),
       GNUNET_MQ_handler_end()
     };
     ccc->p[i] = GNUNET_TRANSPORT_TESTING_start_peer (ccc->tth,
index a2cad07b0e03551d2377b696e8eb859c080a66c4..fd30230f751a3dda44e30f5d4d97e96736415091 100644 (file)
@@ -182,13 +182,13 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
                                     GNUNET_TRANSPORT_AddressToStringCallback aluc,
                                     void *aluc_cls)
 {
-  GNUNET_MQ_hd_var_size (reply,
-                         GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
-                         struct AddressToStringResultMessage);
   struct GNUNET_TRANSPORT_AddressToStringContext *alc
     = GNUNET_new (struct GNUNET_TRANSPORT_AddressToStringContext);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_reply_handler (alc),
+    GNUNET_MQ_hd_var_size (reply,
+                           GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY,
+                           struct AddressToStringResultMessage,
+                           alc),
     GNUNET_MQ_handler_end ()
   };
   size_t alen;
index 2835e225fdef30f2892d626634d6b27b8c0a1ce6..4b758f9dc6cb08282cac1dfc8f0e1eac9d1dd9ac 100644 (file)
@@ -120,11 +120,11 @@ mq_error_handler (void *cls,
 static void
 reconnect (struct GNUNET_TRANSPORT_Blacklist *br)
 {
-  GNUNET_MQ_hd_fixed_size (query,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY,
-                           struct BlacklistMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_query_handler (br),
+    GNUNET_MQ_hd_fixed_size (query,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY,
+                             struct BlacklistMessage,
+                             br),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index 6be9500fb4f49b60caad1eaa33e8278c64f4e737..0705552f9cf292d8e96e8f1e787360b11729fb68 100644 (file)
@@ -748,32 +748,32 @@ handle_set_quota (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (hello,
-                         GNUNET_MESSAGE_TYPE_HELLO,
-                         struct GNUNET_MessageHeader);
-  GNUNET_MQ_hd_fixed_size (connect,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT,
-                           struct ConnectInfoMessage);
-  GNUNET_MQ_hd_fixed_size (disconnect,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT,
-                           struct DisconnectInfoMessage);
-  GNUNET_MQ_hd_fixed_size (send_ok,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK,
-                           struct SendOkMessage);
-  GNUNET_MQ_hd_var_size (recv,
-                         GNUNET_MESSAGE_TYPE_TRANSPORT_RECV,
-                         struct InboundMessage);
-  GNUNET_MQ_hd_fixed_size (set_quota,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA,
-                           struct QuotaSetMessage);
   struct GNUNET_TRANSPORT_CoreHandle *h = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_hello_handler (h),
-    make_connect_handler (h),
-    make_disconnect_handler (h),
-    make_send_ok_handler (h),
-    make_recv_handler (h),
-    make_set_quota_handler (h),
+    GNUNET_MQ_hd_var_size (hello,
+                           GNUNET_MESSAGE_TYPE_HELLO,
+                           struct GNUNET_MessageHeader,
+                           h),
+    GNUNET_MQ_hd_fixed_size (connect,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_CONNECT,
+                             struct ConnectInfoMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (disconnect,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_DISCONNECT,
+                             struct DisconnectInfoMessage,
+                             h),
+    GNUNET_MQ_hd_fixed_size (send_ok,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK,
+                             struct SendOkMessage,
+                             h),
+    GNUNET_MQ_hd_var_size (recv,
+                           GNUNET_MESSAGE_TYPE_TRANSPORT_RECV,
+                           struct InboundMessage,
+                           h),
+    GNUNET_MQ_hd_fixed_size (set_quota,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA,
+                             struct QuotaSetMessage,
+                             h),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index ec7b544d6b868a0456a59e85a6501a2f1c2ee89d..9c3a3e7867f04846128232d66547ed828075f729 100644 (file)
@@ -167,12 +167,12 @@ mq_error_handler (void *cls,
 static void
 reconnect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (hello,
-                         GNUNET_MESSAGE_TYPE_HELLO,
-                         struct GNUNET_MessageHeader);
   struct GNUNET_TRANSPORT_HelloGetHandle *ghh = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_hello_handler (ghh),
+    GNUNET_MQ_hd_var_size (hello,
+                           GNUNET_MESSAGE_TYPE_HELLO,
+                           struct GNUNET_MessageHeader,
+                           ghh),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MQ_Envelope *env;
index a5c70fcfa9edb622b6b779845dc7fdcf97a2f83a..345f2ad6078c0b43404349674c61e1e0ea8e9449 100644 (file)
@@ -344,16 +344,16 @@ mq_error_handler (void *cls,
 static void
 do_peer_connect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (response,
-                         GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE,
-                         struct PeerIterateResponseMessage);
-  GNUNET_MQ_hd_fixed_size (response_end,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_response_handler (pal_ctx),
-    make_response_end_handler (pal_ctx),
+    GNUNET_MQ_hd_var_size (response,
+                           GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE,
+                           struct PeerIterateResponseMessage,
+                           pal_ctx),
+    GNUNET_MQ_hd_fixed_size (response_end,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE_END,
+                             struct GNUNET_MessageHeader,
+                             pal_ctx),
     GNUNET_MQ_handler_end ()
   };
   struct PeerMonitorMessage *msg;
index 01ec2074a61be06a154c30addea551c8f0bfe9dd..7547a3402351fa425bb78f10b3977afed7ac36af 100644 (file)
@@ -372,16 +372,16 @@ mq_error_handler (void *cls,
 static void
 do_plugin_connect (void *cls)
 {
-  GNUNET_MQ_hd_var_size (event,
-                         GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT,
-                         struct TransportPluginMonitorMessage);
-  GNUNET_MQ_hd_fixed_size (sync,
-                           GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_TRANSPORT_PluginMonitor *pm = cls;
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_event_handler (pm),
-    make_sync_handler (pm),
+    GNUNET_MQ_hd_var_size (event,
+                           GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT,
+                           struct TransportPluginMonitorMessage,
+                           pm),
+    GNUNET_MQ_hd_fixed_size (sync,
+                             GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC,
+                             struct GNUNET_MessageHeader,
+                             pm),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_MessageHeader *msg;
index c4ce1ccc289d397aba6ce6a18791cac1af3cfbf4..481e99157ed641e5ffd46699a4390f32d644ae3c 100644 (file)
@@ -722,12 +722,12 @@ loopback_resolution (void *cls)
 static void
 reconnect_task (void *cls)
 {
-  GNUNET_MQ_hd_var_size (response,
-                         GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE,
-                         struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-     make_response_handler (NULL),
-     GNUNET_MQ_handler_end ()
+    GNUNET_MQ_hd_var_size (response,
+                           GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE,
+                           struct GNUNET_MessageHeader,
+                           NULL),
+    GNUNET_MQ_handler_end ()
   };
 
   r_task = NULL;
index 07af5ea35d97e6c3db6621aee2a5cfa05fdb30c6..558a3cf1e74b52b99413a27a7378ac43467fa7b4 100644 (file)
@@ -136,11 +136,11 @@ task (void *cls)
   socklen_t slens[2];
   struct GNUNET_MQ_Envelope *env;
   struct GNUNET_MessageHeader *msg;
-  GNUNET_MQ_hd_fixed_size (bounce,
-                           MY_TYPE,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler chandlers[] = {
-    make_bounce_handler (cls),
+    GNUNET_MQ_hd_fixed_size (bounce,
+                             MY_TYPE,
+                             struct GNUNET_MessageHeader,
+                             cls),
     GNUNET_MQ_handler_end ()
   };
 
index 6d8fffc691999783cd995df7560d7dce970818f1..eac45fc6979184bc6b92f73cff89707d7a08161e 100644 (file)
@@ -231,11 +231,11 @@ task (void *cls)
   socklen_t slens[2];
   struct GNUNET_MQ_Envelope *env;
   struct GNUNET_MessageHeader *msg;
-  GNUNET_MQ_hd_fixed_size (reply,
-                           MY_TYPE,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler chandlers[] = {
-    make_reply_handler (cls),
+    GNUNET_MQ_hd_fixed_size (reply,
+                             MY_TYPE,
+                             struct GNUNET_MessageHeader,
+                             cls),
     GNUNET_MQ_handler_end ()
   };
 
index d6064afd55cb15ad94ffad5cc6ab435424513beb..416f32f62ca4dd3cc06953e96e22275100f61be3 100644 (file)
@@ -133,11 +133,11 @@ task (void *cls)
   socklen_t slens[2];
   struct GNUNET_MQ_Envelope *env;
   struct GNUNET_MessageHeader *msg;
-  GNUNET_MQ_hd_fixed_size (bounce,
-                           MY_TYPE,
-                           struct GNUNET_MessageHeader);
   struct GNUNET_MQ_MessageHandler chandlers[] = {
-    make_bounce_handler (cls),
+    GNUNET_MQ_hd_fixed_size (bounce,
+                             MY_TYPE,
+                             struct GNUNET_MessageHeader,
+                             cls),
     GNUNET_MQ_handler_end ()
   };
 
index ad0b5e9f017e61b13faa01f33c1b759835cd2d64..b22b805cdc2d832a1189ae4ae9860c42635d3156 100644 (file)
@@ -314,11 +314,11 @@ static void
 connect_task (void *cls)
 {
   struct GNUNET_VPN_Handle *vh = cls;
-  GNUNET_MQ_hd_var_size (use_ip,
-                         GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP,
-                         struct RedirectToIpResponseMessage);
   struct GNUNET_MQ_MessageHandler handlers[] = {
-    make_use_ip_handler (cls),
+    GNUNET_MQ_hd_var_size (use_ip,
+                           GNUNET_MESSAGE_TYPE_VPN_CLIENT_USE_IP,
+                           struct RedirectToIpResponseMessage,
+                           cls),
     GNUNET_MQ_handler_end ()
   };
   struct GNUNET_VPN_RedirectionRequest *rr;