diff options
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 536e7382b..e6f52850f 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -85,6 +85,12 @@ struct HTTP_Message | |||
85 | size_t size; | 85 | size_t size; |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * HTTP overhead required to send this message | ||
89 | * FIXME: to implement | ||
90 | */ | ||
91 | size_t overhead; | ||
92 | |||
93 | /** | ||
88 | * Continuation function to call once the transmission buffer | 94 | * Continuation function to call once the transmission buffer |
89 | * has again space available. NULL if there is no | 95 | * has again space available. NULL if there is no |
90 | * continuation to call. | 96 | * continuation to call. |
@@ -546,7 +552,8 @@ client_delete_session (struct Session *s) | |||
546 | next = pos->next; | 552 | next = pos->next; |
547 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, pos); | 553 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, pos); |
548 | if (pos->transmit_cont != NULL) | 554 | if (pos->transmit_cont != NULL) |
549 | pos->transmit_cont (pos->transmit_cont_cls, &s->target, GNUNET_SYSERR); | 555 | pos->transmit_cont (pos->transmit_cont_cls, &s->target, GNUNET_SYSERR, |
556 | pos->size, pos->pos + pos->overhead); | ||
550 | GNUNET_free (pos); | 557 | GNUNET_free (pos); |
551 | } | 558 | } |
552 | 559 | ||
@@ -631,7 +638,8 @@ client_disconnect (struct Session *s) | |||
631 | { | 638 | { |
632 | t = msg->next; | 639 | t = msg->next; |
633 | if (NULL != msg->transmit_cont) | 640 | if (NULL != msg->transmit_cont) |
634 | msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_SYSERR); | 641 | msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_SYSERR, |
642 | msg->size, msg->pos + msg->overhead); | ||
635 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg); | 643 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg); |
636 | GNUNET_free (msg); | 644 | GNUNET_free (msg); |
637 | msg = t; | 645 | msg = t; |
@@ -784,7 +792,8 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls) | |||
784 | /* Calling transmit continuation */ | 792 | /* Calling transmit continuation */ |
785 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg); | 793 | GNUNET_CONTAINER_DLL_remove (s->msg_head, s->msg_tail, msg); |
786 | if (NULL != msg->transmit_cont) | 794 | if (NULL != msg->transmit_cont) |
787 | msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK); | 795 | msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK, |
796 | msg->size, msg->size + msg->overhead); | ||
788 | GNUNET_free (msg); | 797 | GNUNET_free (msg); |
789 | } | 798 | } |
790 | 799 | ||