diff options
Diffstat (limited to 'src/peerinfo/gnunet-service-peerinfo.c')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index 63c605705..ae8a0dfe3 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -776,22 +776,6 @@ handle_notify (void *cls, | |||
776 | 776 | ||
777 | 777 | ||
778 | /** | 778 | /** |
779 | * List of handlers for the messages understood by this | ||
780 | * service. | ||
781 | */ | ||
782 | static struct GNUNET_SERVER_MessageHandler handlers[] = { | ||
783 | {&handle_hello, NULL, GNUNET_MESSAGE_TYPE_HELLO, 0}, | ||
784 | {&handle_get, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_GET, | ||
785 | sizeof (struct ListPeerMessage)}, | ||
786 | {&handle_get_all, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL, | ||
787 | sizeof (struct ListAllPeersMessage)}, | ||
788 | {&handle_notify, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY, | ||
789 | sizeof (struct GNUNET_MessageHeader)}, | ||
790 | {NULL, NULL, 0, 0} | ||
791 | }; | ||
792 | |||
793 | |||
794 | /** | ||
795 | * Clean up our state. Called during shutdown. | 779 | * Clean up our state. Called during shutdown. |
796 | * | 780 | * |
797 | * @param cls unused | 781 | * @param cls unused |
@@ -825,6 +809,16 @@ run (void *cls, | |||
825 | struct GNUNET_SERVER_Handle *server, | 809 | struct GNUNET_SERVER_Handle *server, |
826 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 810 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
827 | { | 811 | { |
812 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { | ||
813 | {&handle_hello, NULL, GNUNET_MESSAGE_TYPE_HELLO, 0}, | ||
814 | {&handle_get, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_GET, | ||
815 | sizeof (struct ListPeerMessage)}, | ||
816 | {&handle_get_all, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL, | ||
817 | sizeof (struct ListAllPeersMessage)}, | ||
818 | {&handle_notify, NULL, GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY, | ||
819 | sizeof (struct GNUNET_MessageHeader)}, | ||
820 | {NULL, NULL, 0, 0} | ||
821 | }; | ||
828 | stats = GNUNET_STATISTICS_create (sched, "peerinfo", cfg); | 822 | stats = GNUNET_STATISTICS_create (sched, "peerinfo", cfg); |
829 | notify_list = GNUNET_SERVER_notification_context_create (server, 0); | 823 | notify_list = GNUNET_SERVER_notification_context_create (server, 0); |
830 | GNUNET_assert (GNUNET_OK == | 824 | GNUNET_assert (GNUNET_OK == |