From 77990e170e992a745b7edde92fbb705247ab83e8 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 16 Oct 2012 11:20:27 +0000 Subject: overhead reporting --- src/transport/plugin_transport_unix.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/transport/plugin_transport_unix.c') diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index fc1556591..5fda1191a 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -377,7 +377,8 @@ disconnect_session (struct Session *s) continue; GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw); if (NULL != msgw->cont) - msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR); + msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR, + msgw->msgsize, 0); GNUNET_free (msgw->msg); GNUNET_free (msgw); removed = GNUNET_YES; @@ -442,7 +443,8 @@ unix_transport_server_stop (void *cls) { GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw); if (msgw->cont != NULL) - msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR); + msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR, + msgw->msgsize, 0); GNUNET_free (msgw->msg); GNUNET_free (msgw); } @@ -508,7 +510,7 @@ unix_real_send (void *cls, /* We do not have a send handle */ GNUNET_break (0); if (cont != NULL) - cont (cont_cls, target, GNUNET_SYSERR); + cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0); return -1; } if ((addr == NULL) || (addrlen == 0)) @@ -516,7 +518,7 @@ unix_real_send (void *cls, /* Can never send if we don't have an address */ GNUNET_break (0); if (cont != NULL) - cont (cont_cls, target, GNUNET_SYSERR); + cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0); return -1; } @@ -598,9 +600,9 @@ unix_real_send (void *cls, if (cont != NULL) { if (sent == GNUNET_SYSERR) - cont (cont_cls, target, GNUNET_SYSERR); + cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0); if (sent > 0) - cont (cont_cls, target, GNUNET_OK); + cont (cont_cls, target, GNUNET_OK, msgbuf_size, msgbuf_size); } /* return number of bytes successfully sent */ -- cgit v1.2.3