diff options
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r-- | src/core/core_api.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index 451b871fb..4c55d0e5f 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -332,6 +332,9 @@ handle_mq_error (void *cls, | |||
332 | { | 332 | { |
333 | struct GNUNET_CORE_Handle *h = cls; | 333 | struct GNUNET_CORE_Handle *h = cls; |
334 | 334 | ||
335 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
336 | "MQ ERROR: %d\n", | ||
337 | error); | ||
335 | reconnect_later (h); | 338 | reconnect_later (h); |
336 | } | 339 | } |
337 | 340 | ||
@@ -707,12 +710,13 @@ handle_send_ready (void *cls, | |||
707 | sm->peer = pr->peer; | 710 | sm->peer = pr->peer; |
708 | sm->cork = htonl ((uint32_t) th->cork); | 711 | sm->cork = htonl ((uint32_t) th->cork); |
709 | sm->reserved = htonl (0); | 712 | sm->reserved = htonl (0); |
713 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
714 | "Calling get_message with buffer of %u bytes\n", | ||
715 | (unsigned int) th->msize); | ||
710 | ret = th->get_message (th->get_message_cls, | 716 | ret = th->get_message (th->get_message_cls, |
711 | th->msize, | 717 | th->msize, |
712 | &sm[1]); | 718 | &sm[1]); |
713 | sm->header.size = htons (ret + sizeof (struct SendMessage)); | 719 | sm->header.size = htons (ret + sizeof (struct SendMessage)); |
714 | th->msize = ret; | ||
715 | // GNUNET_assert (ret == th->msize); /* NOTE: API change! */ | ||
716 | delay = GNUNET_TIME_absolute_get_duration (th->request_time); | 720 | delay = GNUNET_TIME_absolute_get_duration (th->request_time); |
717 | overdue = GNUNET_TIME_absolute_get_duration (th->deadline); | 721 | overdue = GNUNET_TIME_absolute_get_duration (th->deadline); |
718 | if (overdue.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us) | 722 | if (overdue.rel_value_us > GNUNET_CONSTANTS_LATENCY_WARN.rel_value_us) |
@@ -887,6 +891,11 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
887 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 891 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
888 | "Connecting to CORE service\n"); | 892 | "Connecting to CORE service\n"); |
889 | reconnect (h); | 893 | reconnect (h); |
894 | if (NULL == h->mq) | ||
895 | { | ||
896 | GNUNET_CORE_disconnect (h); | ||
897 | return NULL; | ||
898 | } | ||
890 | return h; | 899 | return h; |
891 | } | 900 | } |
892 | 901 | ||