[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r5521 - GNUnet/src/transports
From: |
gnunet |
Subject: |
[GNUnet-SVN] r5521 - GNUnet/src/transports |
Date: |
Sun, 19 Aug 2007 03:10:52 -0600 (MDT) |
Author: grothoff
Date: 2007-08-19 03:10:52 -0600 (Sun, 19 Aug 2007)
New Revision: 5521
Modified:
GNUnet/src/transports/http.c
Log:
stats
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2007-08-19 09:07:14 UTC (rev 5520)
+++ GNUnet/src/transports/http.c 2007-08-19 09:10:52 UTC (rev 5521)
@@ -779,6 +779,9 @@
GE_DEBUG | GE_REQUEST | GE_USER,
"HTTP returns %u bytes in MHD GET handler.\n", max);
#endif
+ if (stats != NULL)
+ stats->change(stat_bytesSent,
+ max);
return max;
}
#endif
@@ -923,6 +926,9 @@
/* handle put (upload_data!) */
poff = 0;
have = *upload_data_size;
+ if (stats != NULL)
+ stats->change(stat_bytesReceived,
+ have);
*upload_data_size = 0; /* we will always process everything */
if ((have == 0) && (put->done == NO) && (put->ready == YES))
{
@@ -1069,6 +1075,9 @@
httpSession->cs.client.rsize2 = 0;
httpSession->cs.client.rpos1 = 0;
}
+ if (stats != NULL)
+ stats->change(stat_bytesReceived,
+ size * nmemb);
return size * nmemb;
}
#endif
@@ -1093,6 +1102,9 @@
GE_DEBUG | GE_REQUEST | GE_USER,
"HTTP/CURL sends %u bytes in PUT request.\n", max);
#endif
+ if (stats != NULL)
+ stats->change(stat_bytesSent,
+ max);
return max;
}
@@ -1375,6 +1387,10 @@
if (httpSession->cs.client.puts->done == YES)
signal_select (); /* do clean up now! */
MUTEX_UNLOCK (httpSession->lock);
+ if (stats != NULL)
+ stats->change(stat_bytesDropped,
+ size);
+
return NO;
}
MUTEX_UNLOCK (httpSession->lock);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r5521 - GNUnet/src/transports,
gnunet <=