[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10576 - in gnunet: contrib src/core src/datastore src/fs s
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10576 - in gnunet: contrib src/core src/datastore src/fs src/util |
Date: |
Fri, 12 Mar 2010 18:09:36 +0100 |
Author: grothoff
Date: 2010-03-12 18:09:36 +0100 (Fri, 12 Mar 2010)
New Revision: 10576
Modified:
gnunet/contrib/defaults.conf
gnunet/src/core/gnunet-service-core.c
gnunet/src/datastore/gnunet-service-datastore.c
gnunet/src/fs/fs_test_lib_data.conf
gnunet/src/util/connection.c
gnunet/src/util/disk.c
gnunet/src/util/server.c
Log:
fixes
Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf 2010-03-12 16:16:01 UTC (rev 10575)
+++ gnunet/contrib/defaults.conf 2010-03-12 17:09:36 UTC (rev 10576)
@@ -32,7 +32,7 @@
ACCEPT_FROM6 = ::1;
ALLOW_SHUTDOWN = YES
DEFAULTSERVICES = resolver transport core topology hostlist
-GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
+#GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
# GLOBAL_PREFIX =
# USERNAME =
# MAXBUF =
@@ -132,6 +132,7 @@
# quotas are in bytes per second now!
TOTAL_QUOTA_IN = 65536
TOTAL_QUOTA_OUT = 65536
+DEBUG = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c 2010-03-12 16:16:01 UTC (rev
10575)
+++ gnunet/src/core/gnunet-service-core.c 2010-03-12 17:09:36 UTC (rev
10576)
@@ -805,7 +805,14 @@
while (c != NULL)
{
if (0 != (c->options & options))
- send_to_client (c, msg, can_drop);
+ {
+#if DEBUG_CORE_CLIENT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Sending message of type %u to client.\n",
+ ntohs (msg->type));
+#endif
+ send_to_client (c, msg, can_drop);
+ }
c = c->next;
}
}
@@ -885,7 +892,7 @@
"Sending `%s' message to client.\n", "INIT_REPLY");
#endif
send_to_client (c, &irm.header, GNUNET_NO);
- if (c->options & GNUNET_CORE_OPTION_SEND_CONNECT)
+ if (0 != (c->options & GNUNET_CORE_OPTION_SEND_CONNECT))
{
/* notify new client about existing neighbours */
cnm.header.size = htons (sizeof (struct ConnectNotifyMessage));
Modified: gnunet/src/datastore/gnunet-service-datastore.c
===================================================================
--- gnunet/src/datastore/gnunet-service-datastore.c 2010-03-12 16:16:01 UTC
(rev 10575)
+++ gnunet/src/datastore/gnunet-service-datastore.c 2010-03-12 17:09:36 UTC
(rev 10576)
@@ -234,6 +234,11 @@
*/
static struct TransmitCallbackContext *tcc_tail;
+/**
+ * Have we already clean ed up the TCCs and are hence no longer
+ * willing (or able) to transmit anything to anyone?
+ */
+static int cleaning_done;
/**
* Task that is used to remove expired entries from
@@ -502,6 +507,12 @@
{
struct TransmitCallbackContext *tcc;
+ if (GNUNET_YES == cleaning_done)
+ {
+ if (NULL != tc)
+ tc (tc_cls, GNUNET_SYSERR);
+ return;
+ }
tcc = GNUNET_malloc (sizeof(struct TransmitCallbackContext));
tcc->msg = msg;
tcc->client = client;
@@ -1257,6 +1268,7 @@
{
struct TransmitCallbackContext *tcc;
+ cleaning_done = GNUNET_YES;
while (NULL != (tcc = tcc_head))
{
GNUNET_CONTAINER_DLL_remove (tcc_head,
Modified: gnunet/src/fs/fs_test_lib_data.conf
===================================================================
--- gnunet/src/fs/fs_test_lib_data.conf 2010-03-12 16:16:01 UTC (rev 10575)
+++ gnunet/src/fs/fs_test_lib_data.conf 2010-03-12 17:09:36 UTC (rev 10576)
@@ -21,6 +21,8 @@
[datastore]
#DEBUG = YES
+#PREFIX = valgrind --tool=memcheck --leak-check=yes
+#BINARY = /home/grothoff/bin/gnunet-service-datastore
[statistics]
PORT = 43467
@@ -40,7 +42,9 @@
HOSTNAME = localhost
#TOTAL_QUOTA_IN = 3932160
#TOTAL_QUOTA_OUT = 3932160
-#DEBUG = YES
+DEBUG = YES
+#PREFIX = valgrind --tool=memcheck --leak-check=yes
+#BINARY = /home/grothoff/bin/gnunet-service-core
[fs]
PORT = 43471
Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c 2010-03-12 16:16:01 UTC (rev 10575)
+++ gnunet/src/util/connection.c 2010-03-12 17:09:36 UTC (rev 10576)
@@ -931,11 +931,6 @@
GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
int finish_pending_write)
{
- if ((sock->write_buffer_off == 0) && (sock->dns_active != NULL))
- {
- GNUNET_RESOLVER_request_cancel (sock->dns_active);
- sock->dns_active = NULL;
- }
if (GNUNET_NO == finish_pending_write)
{
if (sock->write_task != GNUNET_SCHEDULER_NO_TASK)
@@ -943,8 +938,14 @@
GNUNET_SCHEDULER_cancel (sock->sched,
sock->write_task);
sock->write_task = GNUNET_SCHEDULER_NO_TASK;
+ sock->write_buffer_off = 0;
}
}
+ if ((sock->write_buffer_off == 0) && (sock->dns_active != NULL))
+ {
+ GNUNET_RESOLVER_request_cancel (sock->dns_active);
+ sock->dns_active = NULL;
+ }
GNUNET_assert (sock->sched != NULL);
GNUNET_SCHEDULER_add_now (sock->sched,
&destroy_continuation, sock);
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2010-03-12 16:16:01 UTC (rev 10575)
+++ gnunet/src/util/disk.c 2010-03-12 17:09:36 UTC (rev 10576)
@@ -1239,7 +1239,10 @@
fd = open (expfn, oflags | O_LARGEFILE, mode);
if (fd == -1)
{
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", expfn);
+ if (0 == (flags & GNUNET_DISK_OPEN_FAILIFEXISTS))
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "open", expfn);
+ else
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_DEBUG, "open", expfn);
GNUNET_free (expfn);
return NULL;
}
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2010-03-12 16:16:01 UTC (rev 10575)
+++ gnunet/src/util/server.c 2010-03-12 17:09:36 UTC (rev 10576)
@@ -1198,7 +1198,7 @@
}
if (rc > 0)
return;
- if (client->in_process_client_buffer)
+ if (client->in_process_client_buffer == GNUNET_YES)
return;
client->destroy (client->client_closure);
GNUNET_free (client);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10576 - in gnunet: contrib src/core src/datastore src/fs src/util,
gnunet <=