[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24337 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24337 - gnunet/src/transport |
Date: |
Tue, 16 Oct 2012 13:42:54 +0200 |
Author: wachs
Date: 2012-10-16 13:42:54 +0200 (Tue, 16 Oct 2012)
New Revision: 24337
Modified:
gnunet/src/transport/gnunet-service-transport_neighbours.c
gnunet/src/transport/plugin_transport_unix.c
Log:
fix for overhead measurement in unix,also fixes assertion in neighbours 1152
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-10-16
11:20:27 UTC (rev 24336)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-10-16
11:42:54 UTC (rev 24337)
@@ -1151,6 +1151,7 @@
}
GNUNET_assert (bytes_in_send_queue >= mq->message_buf_size);
GNUNET_break (size_payload == mq->message_buf_size);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%u %u res: %u\n",size_payload,
mq->message_buf_size, success);
bytes_in_send_queue -= mq->message_buf_size;
GNUNET_STATISTICS_set (GST_stats,
gettext_noop
Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c 2012-10-16 11:20:27 UTC
(rev 24336)
+++ gnunet/src/transport/plugin_transport_unix.c 2012-10-16 11:42:54 UTC
(rev 24337)
@@ -104,6 +104,7 @@
struct UNIXMessage * msg;
size_t msgsize;
+ size_t payload;
struct GNUNET_TIME_Relative timeout;
unsigned int priority;
@@ -378,7 +379,7 @@
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->msgsize, 0);
+ msgw->payload, 0);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);
removed = GNUNET_YES;
@@ -444,7 +445,7 @@
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->msgsize, 0);
+ msgw->payload, 0);
GNUNET_free (msgw->msg);
GNUNET_free (msgw);
}
@@ -492,8 +493,11 @@
struct GNUNET_NETWORK_Handle *send_handle,
const struct GNUNET_PeerIdentity *target, const char *msgbuf,
size_t msgbuf_size, unsigned int priority,
- struct GNUNET_TIME_Relative timeout, const void *addr,
- size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+ struct GNUNET_TIME_Relative timeout,
+ const void *addr,
+ size_t addrlen,
+ size_t payload,
+ GNUNET_TRANSPORT_TransmitContinuation cont,
void *cont_cls)
{
struct Plugin *plugin = cls;
@@ -510,7 +514,7 @@
/* We do not have a send handle */
GNUNET_break (0);
if (cont != NULL)
- cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
+ cont (cont_cls, target, GNUNET_SYSERR, payload, 0);
return -1;
}
if ((addr == NULL) || (addrlen == 0))
@@ -518,7 +522,7 @@
/* Can never send if we don't have an address */
GNUNET_break (0);
if (cont != NULL)
- cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
+ cont (cont_cls, target, GNUNET_SYSERR, payload, 0);
return -1;
}
@@ -600,9 +604,9 @@
if (cont != NULL)
{
if (sent == GNUNET_SYSERR)
- cont (cont_cls, target, GNUNET_SYSERR, msgbuf_size, 0);
+ cont (cont_cls, target, GNUNET_SYSERR, payload, 0);
if (sent > 0)
- cont (cont_cls, target, GNUNET_OK, msgbuf_size, msgbuf_size);
+ cont (cont_cls, target, GNUNET_OK, payload, msgbuf_size);
}
/* return number of bytes successfully sent */
@@ -781,6 +785,7 @@
wrapper = GNUNET_malloc (sizeof (struct UNIXMessageWrapper));
wrapper->msg = message;
wrapper->msgsize = ssize;
+ wrapper->payload = msgbuf_size;
wrapper->priority = priority;
wrapper->timeout = to;
wrapper->cont = cont;
@@ -936,6 +941,7 @@
msgw->timeout,
msgw->session->addr,
msgw->session->addrlen,
+ msgw->payload,
msgw->cont, msgw->cont_cls);
if (sent == 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24337 - gnunet/src/transport,
gnunet <=