From 7cba739408a3959da9096dc50cabf51fe0accd41 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 1 Apr 2013 19:03:03 +0000 Subject: [PATCH] - revert 26711 and fix 2851 with dirty hack --- src/arm/arm_api.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 8c4192f79..754398fc5 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c @@ -349,6 +349,7 @@ trigger_next_request (struct GNUNET_ARM_Handle *h, int ignore_currently_down) { uint16_t msize; + msize = sizeof (struct GNUNET_MessageHeader); if ((GNUNET_YES == h->currently_down) && (ignore_currently_down == GNUNET_NO)) { LOG (GNUNET_ERROR_TYPE_DEBUG, @@ -360,15 +361,16 @@ trigger_next_request (struct GNUNET_ARM_Handle *h, int ignore_currently_down) LOG (GNUNET_ERROR_TYPE_DEBUG, "Request pending, not processing queue\n"); return; } - if (NULL == h->control_pending_head) + if (NULL != h->control_pending_head) + msize = + ntohs (((struct GNUNET_MessageHeader *) &h-> + control_pending_head[1])->size); + else if (GNUNET_NO == ignore_currently_down) { LOG (GNUNET_ERROR_TYPE_DEBUG, "Request queue empty, not processing queue\n"); return; /* no pending message */ } - msize = - ntohs (((struct GNUNET_MessageHeader *) &h-> - control_pending_head[1])->size); h->cth = GNUNET_CLIENT_notify_transmit_ready (h->client, msize, GNUNET_TIME_UNIT_FOREVER_REL, -- 2.25.1