[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4901 - GNUnet/src/applications/bootstrap_http
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4901 - GNUnet/src/applications/bootstrap_http |
Date: |
Sat, 2 Jun 2007 15:53:31 -0600 (MDT) |
Author: grothoff
Date: 2007-06-02 15:53:30 -0600 (Sat, 02 Jun 2007)
New Revision: 4901
Modified:
GNUnet/src/applications/bootstrap_http/http.c
Log:
compute download size
Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c 2007-06-02 21:53:08 UTC
(rev 4900)
+++ GNUnet/src/applications/bootstrap_http/http.c 2007-06-02 21:53:30 UTC
(rev 4901)
@@ -60,6 +60,8 @@
const char * url;
+ unsigned long long total;
+
} BootstrapContext;
#define USE_MULTI YES
@@ -78,6 +80,7 @@
P2P_hello_MESSAGE * helo;
unsigned int hs;
+ bctx->total += size * nmemb;
if (size * nmemb == 0)
return 0; /* ok, no data */
osize = bctx->bsize;
@@ -96,7 +99,7 @@
if ( (ntohs(helo->header.type) != p2p_PROTO_hello) ||
(P2P_hello_MESSAGE_size(helo) >= MAX_BUFFER_SIZE) ) {
GE_LOG(ectx,
- GE_WARNING | GE_USER | GE_REQUEST,
+ GE_WARNING | GE_USER | GE_IMMEDIATE,
_("Bootstrap data obtained from `%s' is invalid.\n"),
bctx->url);
return 0; /* Error: invalid format! */
@@ -203,7 +206,12 @@
}
pos--;
}
+ GE_LOG(ectx,
+ GE_INFO | GE_BULK | GE_USER,
+ _("Bootstrapping using `%s'.\n"),
+ url);
bctx.url = url;
+ bctx.total = 0;
proxy = NULL;
GC_get_configuration_value_string(coreAPI->cfg,
"GNUNETD",
@@ -375,6 +383,11 @@
__LINE__,
curl_multi_strerror(mret));
#endif
+ GE_LOG(ectx,
+ GE_INFO | GE_BULK | GE_USER,
+ _("Downloaded %llu bytes from `%s'.\n"),
+ bctx.total,
+ url);
FREE(url);
FREE(proxy);
curl_global_cleanup();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4901 - GNUnet/src/applications/bootstrap_http,
gnunet <=