From: Sree Harsha Totakura Date: Mon, 1 Apr 2013 19:03:03 +0000 (+0000) Subject: - revert 26711 and fix 2851 with dirty hack X-Git-Tag: initial-import-from-subversion-38251~9408 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7cba739408a3959da9096dc50cabf51fe0accd41;p=oweals%2Fgnunet.git - revert 26711 and fix 2851 with dirty hack --- 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,