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 =
# quotas are in bytes per second now!
TOTAL_QUOTA_IN = 65536
TOTAL_QUOTA_OUT = 65536
+DEBUG = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
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;
}
}
"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));
*/
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
{
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;
{
struct TransmitCallbackContext *tcc;
+ cleaning_done = GNUNET_YES;
while (NULL != (tcc = tcc_head))
{
GNUNET_CONTAINER_DLL_remove (tcc_head,
[datastore]
#DEBUG = YES
+#PREFIX = valgrind --tool=memcheck --leak-check=yes
+#BINARY = /home/grothoff/bin/gnunet-service-datastore
[statistics]
PORT = 43467
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
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)
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);
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;
}
}
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);