aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-10-16 11:20:27 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-10-16 11:20:27 +0000
commit77990e170e992a745b7edde92fbb705247ab83e8 (patch)
tree5e686547c9bb6d8a752a00c08616a79e872cb8db /src/transport/plugin_transport_unix.c
parent15f8a6f2e023e9da4b41153ecb3fafda2e23cfe7 (diff)
downloadgnunet-77990e170e992a745b7edde92fbb705247ab83e8.tar.gz
gnunet-77990e170e992a745b7edde92fbb705247ab83e8.zip
overhead reporting
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c14
1 files changed, 8 insertions, 6 deletions
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)
377 continue; 377 continue;
378 GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw); 378 GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw);
379 if (NULL != msgw->cont) 379 if (NULL != msgw->cont)
380 msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR); 380 msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR,
381 msgw->msgsize, 0);
381 GNUNET_free (msgw->msg); 382 GNUNET_free (msgw->msg);
382 GNUNET_free (msgw); 383 GNUNET_free (msgw);
383 removed = GNUNET_YES; 384 removed = GNUNET_YES;
@@ -442,7 +443,8 @@ unix_transport_server_stop (void *cls)
442 { 443 {
443 GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw); 444 GNUNET_CONTAINER_DLL_remove (plugin->msg_head, plugin->msg_tail, msgw);
444 if (msgw->cont != NULL) 445 if (msgw->cont != NULL)
445 msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR); 446 msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR,
447 msgw->msgsize, 0);
446 GNUNET_free (msgw->msg); 448 GNUNET_free (msgw->msg);
447 GNUNET_free (msgw); 449 GNUNET_free (msgw);
448 } 450 }
@@ -508,7 +510,7 @@ unix_real_send (void *cls,
508 /* We do not have a send handle */ 510 /* We do not have a send handle */
509 GNUNET_break (0); 511 GNUNET_break (0);
510 if (cont != NULL) 512 if (cont != NULL)
511 cont (cont_cls, target, GNUNET_SYSERR); 513 cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
512 return -1; 514 return -1;
513 } 515 }
514 if ((addr == NULL) || (addrlen == 0)) 516 if ((addr == NULL) || (addrlen == 0))
@@ -516,7 +518,7 @@ unix_real_send (void *cls,
516 /* Can never send if we don't have an address */ 518 /* Can never send if we don't have an address */
517 GNUNET_break (0); 519 GNUNET_break (0);
518 if (cont != NULL) 520 if (cont != NULL)
519 cont (cont_cls, target, GNUNET_SYSERR); 521 cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
520 return -1; 522 return -1;
521 } 523 }
522 524
@@ -598,9 +600,9 @@ unix_real_send (void *cls,
598 if (cont != NULL) 600 if (cont != NULL)
599 { 601 {
600 if (sent == GNUNET_SYSERR) 602 if (sent == GNUNET_SYSERR)
601 cont (cont_cls, target, GNUNET_SYSERR); 603 cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
602 if (sent > 0) 604 if (sent > 0)
603 cont (cont_cls, target, GNUNET_OK); 605 cont (cont_cls, target, GNUNET_OK, msgbuf_size, msgbuf_size);
604 } 606 }
605 607
606 /* return number of bytes successfully sent */ 608 /* return number of bytes successfully sent */