[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3362 - in GNUnet: . src/applications/datastore src/applica
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3362 - in GNUnet: . src/applications/datastore src/applications/fs/ecrs src/applications/fs/lib src/applications/fs/module src/applications/gap src/applications/tbench src/applications/topology_f2f src/util/config_impl src/util/network |
Date: |
Tue, 5 Sep 2006 16:49:01 -0700 (PDT) |
Author: grothoff
Date: 2006-09-05 16:48:53 -0700 (Tue, 05 Sep 2006)
New Revision: 3362
Modified:
GNUnet/src/applications/datastore/Makefile.am
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/searchtest.c
GNUnet/src/applications/fs/lib/fslibtest.c
GNUnet/src/applications/fs/lib/peer.conf
GNUnet/src/applications/fs/module/Makefile.am
GNUnet/src/applications/gap/Makefile.am
GNUnet/src/applications/tbench/Makefile.am
GNUnet/src/applications/topology_f2f/Makefile.am
GNUnet/src/util/config_impl/impl.c
GNUnet/src/util/network/io.c
GNUnet/src/util/network/select.c
GNUnet/todo
Log:
link fixes
Modified: GNUnet/src/applications/datastore/Makefile.am
===================================================================
--- GNUnet/src/applications/datastore/Makefile.am 2006-09-05 23:30:50 UTC
(rev 3361)
+++ GNUnet/src/applications/datastore/Makefile.am 2006-09-05 23:48:53 UTC
(rev 3362)
@@ -13,5 +13,6 @@
-export-dynamic -avoid-version -module
libgnunetmodule_datastore_la_LIBADD = \
$(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/util/cron/libgnunetutil_cron.la \
$(top_builddir)/src/util/containers/libgnunetutil_containers.la
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2006-09-05 23:30:50 UTC (rev
3361)
+++ GNUnet/src/applications/fs/ecrs/search.c 2006-09-05 23:48:53 UTC (rev
3362)
@@ -31,7 +31,7 @@
#include "ecrs_core.h"
#include "ecrs.h"
-#define DEBUG_SEARCH NO
+#define DEBUG_SEARCH YES
typedef struct {
@@ -339,9 +339,10 @@
type = ntohl(value->type);
size = ntohl(value->size) - sizeof(Datastore_Value);
#if DEBUG_SEARCH
- GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
- "Search received reply of type %u and size %u.\n",
- type, size);
+ GE_LOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Search received reply of type %u and size %u.\n",
+ type, size);
#endif
if (OK != getQueryFor(size,
(const DBlock*) &value[1],
@@ -376,9 +377,10 @@
IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&ps->decryptKey,
&enc));
- GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
- "Decrypting KBlock with key %s.\n",
- &enc);
+ GE_LOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Decrypting KBlock with key %s.\n",
+ &enc);
#endif
ECRS_decryptInPlace(&ps->decryptKey,
&kb[1],
@@ -617,10 +619,11 @@
ps->priority = new_priority;
ps->lastTransmission = now;
#if DEBUG_SEARCH
- GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
- "ECRS initiating FS search with timeout %llus and priority %u.\n",
- (ps->timeout - now) / cronSECONDS,
- ps->priority);
+ GE_LOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "ECRS initiating FS search with timeout %llus and priority %u.\n",
+ (ps->timeout - now) / cronSECONDS,
+ ps->priority);
#endif
ps->handle
= FS_start_search(ctx.sctx,
Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c 2006-09-05 23:30:50 UTC
(rev 3361)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c 2006-09-05 23:48:53 UTC
(rev 3362)
@@ -44,7 +44,7 @@
int isRoot,
void * closure) {
int * cnt = closure;
-#if 0
+#if 1
char * st;
st = ECRS_uriToString(fi->uri);
@@ -108,7 +108,7 @@
CHECK(sock != NULL);
/* ACTUAL TEST CODE */
/* first, simple insertion => one result */
-#if 0
+#if 1
printf("Testing search for 'XXtest' with one result.\n");
#endif
uri = ECRS_stringToUri(NULL,
@@ -133,7 +133,7 @@
/* inserting another URI under the 'XXtest' keyword and under 'binary'
should give both URIs since ECRS knows nothing about 'AND'ing: */
-#if 0
+#if 1
printf("Testing search for 'XXtest AND binary' with two results.\n");
#endif
uri = ECRS_stringToUri(NULL,
Modified: GNUnet/src/applications/fs/lib/fslibtest.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslibtest.c 2006-09-05 23:30:50 UTC (rev
3361)
+++ GNUnet/src/applications/fs/lib/fslibtest.c 2006-09-05 23:48:53 UTC (rev
3362)
@@ -200,7 +200,7 @@
return closure.found;
}
-#define START_DAEMON 1
+#define START_DAEMON 0
int main(int argc, char * argv[]){
#if START_DAEMON
Modified: GNUnet/src/applications/fs/lib/peer.conf
===================================================================
--- GNUnet/src/applications/fs/lib/peer.conf 2006-09-05 23:30:50 UTC (rev
3361)
+++ GNUnet/src/applications/fs/lib/peer.conf 2006-09-05 23:48:53 UTC (rev
3362)
@@ -1,15 +1,17 @@
# This is the configuration for the GNUnet daemon when running
# the test in this directory (make check).
+HOME = /tmp/gnunet-check-fslib
+
[GNUNETD]
-GNUNETD_HOME = /tmp/gnunet-check-fslib
+GNUNETD_HOME = $HOME
VALGRIND = 300
HELLOEXPIRES = 60
LOGLEVEL = ERROR
-LOGFILE = $GNUNETD_HOME/logs
+LOGFILE = $HOME/logs
KEEPLOG = 0
-PIDFILE = $GNUNETD_HOME/gnunetd.pid
-HOSTS = $GNUNETD_HOME/data/hosts/
+PIDFILE = $HOME/gnunetd.pid
+HOSTS = $HOME/data/hosts/
APPLICATIONS = "fs stats"
# TRANSPORTS = -- no transports!
@@ -35,8 +37,8 @@
[FS]
QUOTA = 1024
ACTIVEMIGRATION = NO
-DIR = /tmp/gnunet-fslib-test/
-INDEX-DIRECTORY = $GNUNETD_HOME/data/shared/
+DIR = $HOME
+INDEX-DIRECTORY = $HOME/data/shared/
INDEX-QUOTA = 8192
[MYSQL]
Modified: GNUnet/src/applications/fs/module/Makefile.am
===================================================================
--- GNUnet/src/applications/fs/module/Makefile.am 2006-09-05 23:30:50 UTC
(rev 3361)
+++ GNUnet/src/applications/fs/module/Makefile.am 2006-09-05 23:48:53 UTC
(rev 3362)
@@ -16,5 +16,6 @@
-export-dynamic -avoid-version -module
libgnunetmodule_fs_la_LIBADD = \
$(top_builddir)/src/applications/fs/libecrs_core.la \
+ $(top_builddir)/src/util/crypto/libgnunetutil_crypto.la \
$(top_builddir)/src/util/libgnunetutil.la
Modified: GNUnet/src/applications/gap/Makefile.am
===================================================================
--- GNUnet/src/applications/gap/Makefile.am 2006-09-05 23:30:50 UTC (rev
3361)
+++ GNUnet/src/applications/gap/Makefile.am 2006-09-05 23:48:53 UTC (rev
3362)
@@ -3,7 +3,8 @@
plugindir = $(libdir)/GNUnet
LDADD = \
- $(top_builddir)/src/util/libgnunetutil.la
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/util/crypto/libgnunetutil_crypto.la
plugin_LTLIBRARIES = \
libgnunetmodule_gap.la
Modified: GNUnet/src/applications/tbench/Makefile.am
===================================================================
--- GNUnet/src/applications/tbench/Makefile.am 2006-09-05 23:30:50 UTC (rev
3361)
+++ GNUnet/src/applications/tbench/Makefile.am 2006-09-05 23:48:53 UTC (rev
3362)
@@ -6,6 +6,7 @@
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/util/network_client/libgnunetutil_network_client.la \
$(top_builddir)/src/util/loggers/libgnunetutil_logging.la \
+ $(top_builddir)/src/util/cron/libgnunetutil_cron.la \
$(top_builddir)/src/util/crypto/libgnunetutil_crypto.la \
$(top_builddir)/src/util/config_impl/libgnunetutil_config.la
Modified: GNUnet/src/applications/topology_f2f/Makefile.am
===================================================================
--- GNUnet/src/applications/topology_f2f/Makefile.am 2006-09-05 23:30:50 UTC
(rev 3361)
+++ GNUnet/src/applications/topology_f2f/Makefile.am 2006-09-05 23:48:53 UTC
(rev 3362)
@@ -8,6 +8,8 @@
libgnunetmodule_topology_f2f_la_SOURCES = \
topology.c
libgnunetmodule_topology_f2f_la_LIBADD = \
- $(top_builddir)/src/util/libgnunetutil.la
+ $(top_builddir)/src/util/cron/libgnunetutil_cron.la \
+ $(top_builddir)/src/util/crypto/libgnunetutil_crypto.la \
+ $(top_builddir)/src/util/libgnunetutil.la
libgnunetmodule_topology_f2f_la_LDFLAGS = \
-export-dynamic -avoid-version -module
Modified: GNUnet/src/util/config_impl/impl.c
===================================================================
--- GNUnet/src/util/config_impl/impl.c 2006-09-05 23:30:50 UTC (rev 3361)
+++ GNUnet/src/util/config_impl/impl.c 2006-09-05 23:48:53 UTC (rev 3362)
@@ -646,8 +646,6 @@
(orig[i] != '\\') &&
(orig[i] != '\0') )
i++;
- if (orig[i] == '\0')
- return orig;
orig[i] = '\0';
prefix = NULL;
if (0 != _get_configuration_value_string(cfg,
Modified: GNUnet/src/util/network/io.c
===================================================================
--- GNUnet/src/util/network/io.c 2006-09-05 23:30:50 UTC (rev 3361)
+++ GNUnet/src/util/network/io.c 2006-09-05 23:48:53 UTC (rev 3362)
@@ -22,8 +22,6 @@
* @file util/network/io.c
* @brief (network) input/output operations
* @author Christian Grothoff
- *
- * TODO: load monitor support!
*/
#include "gnunet_util_network.h"
@@ -35,13 +33,21 @@
*/
static struct MUTEX * lock;
+static struct SignalHandlerContext * sctx;
+
+static void catcher() {
+}
+
void __attribute__ ((constructor)) gnunet_network_io_init() {
lock = MUTEX_CREATE(NO);
+ sctx = signal_handler_install(SIGPIPE, &catcher);
}
void __attribute__ ((destructor)) gnunet_network_io_fini() {
MUTEX_DESTROY(lock);
lock = NULL;
+ signal_handler_uninstall(SIGPIPE, &catcher, sctx);
+ sctx = NULL;
}
/**
@@ -204,6 +210,10 @@
*read = pos;
return SYSERR;
}
+ if (s->mon != NULL)
+ os_network_monitor_notify_transmission(s->mon,
+ Download,
+ ret);
pos += ret;
} while ( (pos < max) &&
(0 != (nc & NC_Blocking)) );
@@ -275,6 +285,10 @@
*read = pos;
return SYSERR;
}
+ if (s->mon != NULL)
+ os_network_monitor_notify_transmission(s->mon,
+ Download,
+ ret);
pos += ret;
} while ( (pos < max) &&
(0 != (nc & NC_Blocking)) );
@@ -343,6 +357,10 @@
*sent = pos;
return SYSERR;
}
+ if (s->mon != NULL)
+ os_network_monitor_notify_transmission(s->mon,
+ Upload,
+ ret);
pos += ret;
} while ( (pos < max) &&
(0 != (nc & NC_Blocking)) );
@@ -415,6 +433,10 @@
*sent = pos;
return SYSERR;
}
+ if (s->mon != NULL)
+ os_network_monitor_notify_transmission(s->mon,
+ Upload,
+ ret);
pos += ret;
} while ( (pos < max) &&
(0 != (nc & NC_Blocking)) );
@@ -439,24 +461,4 @@
#endif
}
-
-/* some systems send us signals, so we'd better
- catch them (& ignore) */
-#ifndef LINUX
-static void catcher(int sig) {
- /* re-install signal handler! */
- signal(sig, &catcher);
-}
-#endif
-
-/* TODO: add destructor to restore signal handler */
-void __attribute__ ((constructor)) gnunet_io_ltdl_init() {
-#if ! (defined(LINUX) || defined(MINGW))
- if ( SIG_ERR == signal(SIGPIPE, SIG_IGN))
- if ( SIG_ERR == signal(SIGPIPE, &catcher))
- LOG_STRERROR(LOG_WARNING, "signal");
-#endif
-}
-
-
/* end of io.c */
Modified: GNUnet/src/util/network/select.c
===================================================================
--- GNUnet/src/util/network/select.c 2006-09-05 23:30:50 UTC (rev 3361)
+++ GNUnet/src/util/network/select.c 2006-09-05 23:48:53 UTC (rev 3362)
@@ -481,18 +481,19 @@
s = ACCEPT(sh->listen_sock->handle,
(struct sockaddr *) clientAddr,
&lenOfIncomingAddr);
-#if DEBUG_SELECT
- GE_LOG(sh->ectx,
- GE_DEBUG | GE_DEVELOPER | GE_BULK,
- "Select %p is accepting connection: %d\n",
- sh,
- s);
-#endif
if (s == -1) {
GE_LOG_STRERROR(sh->ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"accept");
+ break;
} else {
+#if DEBUG_SELECT
+ GE_LOG(sh->ectx,
+ GE_DEBUG | GE_DEVELOPER | GE_BULK,
+ "Select %p is accepting connection: %d\n",
+ sh,
+ s);
+#endif
sock = socket_create(sh->ectx,
sh->load_monitor,
s);
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-09-05 23:30:50 UTC (rev 3361)
+++ GNUnet/todo 2006-09-05 23:48:53 UTC (rev 3362)
@@ -16,7 +16,6 @@
- finish util refactoring: [RC]
* $GNUNET_HOME directory creation (where?)
* util:
- + network/io: load monitor support
+ loggers: SMTP logger
+ use new loggers in for CS error reporting
* make testcases compile & pass again:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3362 - in GNUnet: . src/applications/datastore src/applications/fs/ecrs src/applications/fs/lib src/applications/fs/module src/applications/gap src/applications/tbench src/applications/topology_f2f src/util/config_impl src/util/network,
grothoff <=