aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-27 09:51:31 +0000
committerChristian Grothoff <christian@grothoff.org>2016-06-27 09:51:31 +0000
commit1655c09ee78640747e2d49326e464855ae999d5b (patch)
tree35021773647bf38e56cae749e56d28690de408cb /src
parentdf2132e55bb03881ea4502ecdc2170a37f14b3b5 (diff)
downloadgnunet-1655c09ee78640747e2d49326e464855ae999d5b.tar.gz
gnunet-1655c09ee78640747e2d49326e464855ae999d5b.zip
-fix queueing issue
Diffstat (limited to 'src')
-rw-r--r--src/core/core_api.c13
-rw-r--r--src/core/test_core_api_data.conf1
2 files changed, 11 insertions, 3 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
diff --git a/src/core/test_core_api_data.conf b/src/core/test_core_api_data.conf
index a13cc8706..53f864bdd 100644
--- a/src/core/test_core_api_data.conf
+++ b/src/core/test_core_api_data.conf
@@ -8,4 +8,3 @@ WAN_QUOTA_OUT = 64 kiB
8[core] 8[core]
9PORT = 2092 9PORT = 2092
10UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-core.sock 10UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-core.sock
11