[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10564 - in gnunet/src: arm core datastore dv fs include pe
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10564 - in gnunet/src: arm core datastore dv fs include peerinfo statistics transport util |
Date: |
Fri, 12 Mar 2010 14:29:05 +0100 |
Author: grothoff
Date: 2010-03-12 14:29:05 +0100 (Fri, 12 Mar 2010)
New Revision: 10564
Modified:
gnunet/src/arm/arm_api.c
gnunet/src/core/core_api.c
gnunet/src/core/core_api_peer_get_info.c
gnunet/src/core/core_api_peer_request.c
gnunet/src/datastore/datastore_api.c
gnunet/src/datastore/plugin_datastore_sqlite.c
gnunet/src/dv/dv_api.c
gnunet/src/fs/fs.c
gnunet/src/fs/fs_download.c
gnunet/src/fs/fs_list_indexed.c
gnunet/src/fs/fs_publish.c
gnunet/src/fs/fs_search.c
gnunet/src/fs/fs_unindex.c
gnunet/src/include/gnunet_client_lib.h
gnunet/src/include/gnunet_connection_lib.h
gnunet/src/peerinfo/peerinfo_api.c
gnunet/src/statistics/statistics_api.c
gnunet/src/transport/transport_api.c
gnunet/src/transport/transport_api_address_lookup.c
gnunet/src/transport/transport_api_blacklist.c
gnunet/src/util/client.c
gnunet/src/util/common_logging.c
gnunet/src/util/connection.c
gnunet/src/util/resolver_api.c
gnunet/src/util/server.c
gnunet/src/util/test_client.c
gnunet/src/util/test_connection.c
gnunet/src/util/test_connection_addressing.c
gnunet/src/util/test_connection_receive_cancel.c
gnunet/src/util/test_connection_timeout.c
gnunet/src/util/test_connection_transmit_cancel.c
gnunet/src/util/test_server_disconnect.c
gnunet/src/util/test_server_with_client.c
Log:
cancel pending write if we are just dead anyway
Modified: gnunet/src/arm/arm_api.c
===================================================================
--- gnunet/src/arm/arm_api.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/arm/arm_api.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -104,7 +104,7 @@
GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h)
{
if (h->client != NULL)
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
GNUNET_CONFIGURATION_destroy (h->cfg);
GNUNET_free (h);
}
@@ -274,7 +274,7 @@
? "START"
: "STOP",
(const char*) &sc[1]);
- GNUNET_CLIENT_disconnect (sc->h->client);
+ GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO);
sc->h->client = GNUNET_CLIENT_connect (sc->h->sched,
"arm",
sc->h->cfg);
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/core/core_api.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -257,7 +257,7 @@
reconnect (struct GNUNET_CORE_Handle *h)
{
if (h->client_notifications != NULL)
- GNUNET_CLIENT_disconnect (h->client_notifications);
+ GNUNET_CLIENT_disconnect (h->client_notifications, GNUNET_NO);
h->currently_down = GNUNET_YES;
h->client_notifications = GNUNET_CLIENT_connect (h->sched, "core", h->cfg);
if (h->client_notifications == NULL)
@@ -793,7 +793,7 @@
if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
if (handle->client_notifications != NULL)
- GNUNET_CLIENT_disconnect (handle->client_notifications);
+ GNUNET_CLIENT_disconnect (handle->client_notifications, GNUNET_NO);
GNUNET_free_non_null (handle->solicit_buffer);
GNUNET_free (handle);
}
Modified: gnunet/src/core/core_api_peer_get_info.c
===================================================================
--- gnunet/src/core/core_api_peer_get_info.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/core/core_api_peer_get_info.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -68,7 +68,7 @@
if (irc->info != NULL)
irc->info (irc->info_cls,
NULL, zbw, zbw, 0, 0);
- GNUNET_CLIENT_disconnect (irc->client);
+ GNUNET_CLIENT_disconnect (irc->client, GNUNET_NO);
GNUNET_free (irc);
return;
}
@@ -79,7 +79,7 @@
if (irc->info != NULL)
irc->info (irc->info_cls,
NULL, zbw, zbw, 0, 0);
- GNUNET_CLIENT_disconnect (irc->client);
+ GNUNET_CLIENT_disconnect (irc->client, GNUNET_NO);
GNUNET_free (irc);
return;
}
@@ -91,7 +91,7 @@
cim->bw_out,
ntohl (cim->reserved_amount),
GNUNET_ntohll (cim->preference));
- GNUNET_CLIENT_disconnect (irc->client);
+ GNUNET_CLIENT_disconnect (irc->client, GNUNET_NO);
GNUNET_free (irc);
}
@@ -170,7 +170,7 @@
void
GNUNET_CORE_peer_change_preference_cancel (struct
GNUNET_CORE_InformationRequestContext *irc)
{
- GNUNET_CLIENT_disconnect (irc->client);
+ GNUNET_CLIENT_disconnect (irc->client, GNUNET_NO);
GNUNET_free (irc);
}
Modified: gnunet/src/core/core_api_peer_request.c
===================================================================
--- gnunet/src/core/core_api_peer_request.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/core/core_api_peer_request.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -95,7 +95,7 @@
prh->cont,
prh->cont_cls,
GNUNET_SCHEDULER_REASON_TIMEOUT);
- GNUNET_CLIENT_disconnect (prh->client);
+ GNUNET_CLIENT_disconnect (prh->client, GNUNET_NO);
GNUNET_free (prh);
return 0;
}
@@ -110,7 +110,7 @@
prh->cont,
prh->cont_cls,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
- GNUNET_CLIENT_disconnect (prh->client);
+ GNUNET_CLIENT_disconnect (prh->client, GNUNET_YES);
GNUNET_free (prh);
return sizeof (msg);
}
@@ -176,7 +176,7 @@
void
GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle
*req)
{
- GNUNET_CLIENT_disconnect (req->client);
+ GNUNET_CLIENT_disconnect (req->client, GNUNET_NO);
GNUNET_free (req);
}
Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/datastore/datastore_api.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -159,7 +159,7 @@
GNUNET_break (0);
}
if (h->client != NULL)
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
GNUNET_ARM_stop_services (h->cfg, h->sched, "datastore", NULL);
GNUNET_free (h);
}
@@ -188,7 +188,7 @@
if (msg == NULL)
{
h->response_proc = NULL;
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
cont (h->response_proc_cls,
GNUNET_SYSERR,
@@ -200,7 +200,7 @@
{
GNUNET_break (0);
h->response_proc = NULL;
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
cont (h->response_proc_cls,
GNUNET_SYSERR,
@@ -469,7 +469,7 @@
if (msg == NULL)
{
h->response_proc = NULL;
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
cont (h->response_proc_cls,
NULL, 0, NULL, 0, 0, 0,
@@ -493,7 +493,7 @@
(ntohs(msg->type) != GNUNET_MESSAGE_TYPE_DATASTORE_DATA) )
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
h->response_proc = NULL;
cont (h->response_proc_cls,
@@ -506,7 +506,7 @@
if (ntohs(msg->size) != msize + sizeof(struct DataMessage))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
h->response_proc = NULL;
cont (h->response_proc_cls,
@@ -558,7 +558,7 @@
}
cont = h->response_proc;
h->response_proc = NULL;
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = GNUNET_CLIENT_connect (h->sched, "datastore", h->cfg);
cont (h->response_proc_cls,
NULL, 0, NULL, 0, 0, 0,
Modified: gnunet/src/datastore/plugin_datastore_sqlite.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_sqlite.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/datastore/plugin_datastore_sqlite.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -131,6 +131,11 @@
* Handle for pending get request.
*/
struct GNUNET_STATISTICS_GetHandle *stat_get;
+
+ /**
+ * Pending task with scheduler for running the next request.
+ */
+ GNUNET_SCHEDULER_TaskIdentifier next_task;
/**
* How much data are we currently storing
@@ -540,9 +545,9 @@
struct GNUNET_TIME_Absolute expiration;
const GNUNET_HashCode *key;
const void *data;
-
-
+
plugin = nc->plugin;
+ plugin->next_task = GNUNET_SCHEDULER_NO_TASK;
if ( (GNUNET_YES == nc->end_it) ||
(GNUNET_OK != (nc->prep(nc->prep_cls,
nc))) )
@@ -668,10 +673,9 @@
if (GNUNET_YES == end_it)
nc->end_it = GNUNET_YES;
- GNUNET_SCHEDULER_add_continuation (nc->plugin->env->sched,
- &sqlite_next_request_cont,
- nc,
- GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+ nc->plugin->next_task = GNUNET_SCHEDULER_add_now (nc->plugin->env->sched,
+ &sqlite_next_request_cont,
+ nc);
}
@@ -1646,6 +1650,12 @@
GNUNET_STATISTICS_get_cancel (plugin->stat_get);
plugin->stat_get = NULL;
}
+ if (plugin->next_task != GNUNET_SCHEDULER_NO_TASK)
+ {
+ GNUNET_SCHEDULER_cancel (plugin->env->sched,
+ plugin->next_task);
+ plugin->next_task = GNUNET_SCHEDULER_NO_TASK;
+ }
fn = NULL;
if (plugin->drop_on_shutdown)
fn = GNUNET_strdup (plugin->fn);
Modified: gnunet/src/dv/dv_api.c
===================================================================
--- gnunet/src/dv/dv_api.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/dv/dv_api.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -384,7 +384,7 @@
}
if (handle->client != NULL) /* Finally, disconnect from the service */
{
- GNUNET_CLIENT_disconnect (handle->client);
+ GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
handle->client = NULL;
}
Modified: gnunet/src/fs/fs.c
===================================================================
--- gnunet/src/fs/fs.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -97,7 +97,7 @@
{
// FIXME: serialize state!? (or is it always serialized???)
// FIXME: terminate receive-loop with client
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
GNUNET_free (h->client_name);
GNUNET_free (h);
}
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs_download.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -394,7 +394,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th);
dc->th = NULL;
}
- GNUNET_CLIENT_disconnect (dc->client);
+ GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
dc->client = NULL;
return GNUNET_NO;
}
@@ -460,7 +460,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th);
dc->th = NULL;
}
- GNUNET_CLIENT_disconnect (dc->client);
+ GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
dc->client = NULL;
GNUNET_free (sm);
return GNUNET_NO;
@@ -776,7 +776,7 @@
GNUNET_CONTAINER_multihashmap_iterate (dc->active,
&retry_entry,
dc);
- GNUNET_CLIENT_disconnect (dc->client);
+ GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
dc->client = NULL;
}
dc->task
@@ -879,7 +879,7 @@
GNUNET_CONTAINER_meta_data_destroy (dc->meta);
GNUNET_FS_uri_destroy (dc->uri);
GNUNET_free (dc->filename);
- GNUNET_CLIENT_disconnect (dc->client);
+ GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
GNUNET_free (dc);
return NULL;
}
@@ -960,7 +960,7 @@
dc->th = NULL;
}
if (NULL != dc->client)
- GNUNET_CLIENT_disconnect (dc->client);
+ GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
GNUNET_CONTAINER_multihashmap_iterate (dc->active,
&free_entry,
NULL);
Modified: gnunet/src/fs/fs_list_indexed.c
===================================================================
--- gnunet/src/fs/fs_list_indexed.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs_list_indexed.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -94,7 +94,7 @@
gic->cont,
gic->cont_cls,
GNUNET_SCHEDULER_REASON_TIMEOUT);
- GNUNET_CLIENT_disconnect (gic->client);
+ GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO);
GNUNET_free (gic);
return;
}
@@ -105,7 +105,7 @@
gic->cont,
gic->cont_cls,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
- GNUNET_CLIENT_disconnect (gic->client);
+ GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO);
GNUNET_free (gic);
return;
}
@@ -125,7 +125,7 @@
gic->cont,
gic->cont_cls,
GNUNET_SCHEDULER_REASON_TIMEOUT);
- GNUNET_CLIENT_disconnect (gic->client);
+ GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO);
GNUNET_free (gic);
return;
}
@@ -138,7 +138,7 @@
gic->cont,
gic->cont_cls,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
- GNUNET_CLIENT_disconnect (gic->client);
+ GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO);
GNUNET_free (gic);
return;
}
Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs_publish.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -664,7 +664,7 @@
const char *emsg;
uint16_t msize;
- GNUNET_CLIENT_disconnect (sc->client);
+ GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
sc->client = NULL;
p = sc->fi_pos;
if (msg == NULL)
Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs_search.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -715,7 +715,7 @@
{
if (NULL != sc->client)
{
- GNUNET_CLIENT_disconnect (sc->client);
+ GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
sc->client = NULL;
}
sc->task
@@ -858,7 +858,7 @@
sc->task);
sc->task = GNUNET_SCHEDULER_NO_TASK;
if (NULL != sc->client)
- GNUNET_CLIENT_disconnect (sc->client);
+ GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
sc->client = NULL;
// FIXME: make persistent!
// FIXME: should this freeze all active probes?
@@ -967,7 +967,7 @@
GNUNET_SCHEDULER_cancel (sc->h->sched,
sc->task);
if (NULL != sc->client)
- GNUNET_CLIENT_disconnect (sc->client);
+ GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
for (i=0;i<sc->uri->data.ksk.keywordCount;i++)
GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results);
Modified: gnunet/src/fs/fs_unindex.c
===================================================================
--- gnunet/src/fs/fs_unindex.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/fs/fs_unindex.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -284,7 +284,7 @@
{
struct GNUNET_FS_UnindexContext *uc = cls;
- GNUNET_CLIENT_disconnect (uc->client);
+ GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO);
uc->client = NULL;
if (uc->state != UNINDEX_STATE_FS_NOTIFY)
{
Modified: gnunet/src/include/gnunet_client_lib.h
===================================================================
--- gnunet/src/include/gnunet_client_lib.h 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/include/gnunet_client_lib.h 2010-03-12 13:29:05 UTC (rev
10564)
@@ -75,19 +75,24 @@
int do_ignore);
+
/**
* Destroy connection with the service. This will automatically
* cancel any pending "receive" request (however, the handler will
* *NOT* be called, not even with a NULL message). Any pending
* transmission request will also be cancelled UNLESS the callback for
* the transmission request has already been called, in which case the
- * transmission is guaranteed to complete before the socket is fully
- * destroyed (unless, of course, there is an error with the server
- * in which case the message may still be lost).
+ * transmission 'finish_pending_write' argument determines whether or
+ * not the write is guaranteed to complete before the socket is fully
+ * destroyed (unless, of course, there is an error with the server in
+ * which case the message may still be lost).
*
* @param sock handle to the service connection
+ * @param finish_pending_write should a transmission already passed to the
+ * handle be completed?
*/
-void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock);
+void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+ int finish_pending_write);
/**
* Type of a function to call when we receive a message
Modified: gnunet/src/include/gnunet_connection_lib.h
===================================================================
--- gnunet/src/include/gnunet_connection_lib.h 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/include/gnunet_connection_lib.h 2010-03-12 13:29:05 UTC (rev
10564)
@@ -197,15 +197,23 @@
*sock, void **addr,
size_t * addrlen);
+
/**
- * Close the socket and free associated resources. Pending
- * transmissions are simply dropped. A pending receive call will be
- * called with an error code of "EPIPE".
+ * Close the socket and free associated resources. Pending
+ * transmissions may be completed or dropped depending on the
+ * arguments. If a receive call is pending and should
+ * NOT be completed, 'GNUNET_CONNECTION_receive_cancel'
+ * should be called explicitly first.
*
* @param sock socket to destroy
+ * @param finish_pending_write should pending writes be completed or aborted?
+ * (this applies to transmissions where the data has already been
+ * read from the application; all other transmissions should be
+ * aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
*/
-void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle
- *sock);
+void
+GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
+ int finish_pending_write);
/**
Modified: gnunet/src/peerinfo/peerinfo_api.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/peerinfo/peerinfo_api.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -56,7 +56,7 @@
ntohs (msg->type), "peerinfo");
#endif
GNUNET_free (msg);
- GNUNET_CLIENT_disconnect (cc->client);
+ GNUNET_CLIENT_disconnect (cc->client, GNUNET_NO);
GNUNET_free (cc);
return 0;
}
@@ -64,7 +64,7 @@
GNUNET_assert (size >= msize);
memcpy (buf, msg, msize);
GNUNET_free (msg);
- GNUNET_CLIENT_disconnect (cc->client);
+ GNUNET_CLIENT_disconnect (cc->client, GNUNET_YES);
GNUNET_free (cc);
return msize;
}
@@ -175,7 +175,7 @@
_("Failed to receive response from `%s' service.\n"),
"peerinfo");
ic->callback (ic->callback_cls, NULL, NULL, 1);
- GNUNET_CLIENT_disconnect (ic->client);
+ GNUNET_CLIENT_disconnect (ic->client, GNUNET_NO);
GNUNET_free (ic);
return;
}
@@ -186,7 +186,7 @@
"Received end of list of peers from peerinfo database\n");
#endif
ic->callback (ic->callback_cls, NULL, NULL, 0);
- GNUNET_CLIENT_disconnect (ic->client);
+ GNUNET_CLIENT_disconnect (ic->client, GNUNET_NO);
GNUNET_free (ic);
return;
}
@@ -196,7 +196,7 @@
{
GNUNET_break (0);
ic->callback (ic->callback_cls, NULL, NULL, 2);
- GNUNET_CLIENT_disconnect (ic->client);
+ GNUNET_CLIENT_disconnect (ic->client, GNUNET_NO);
GNUNET_free (ic);
return;
}
@@ -209,7 +209,7 @@
{
GNUNET_break (0);
ic->callback (ic->callback_cls, NULL, NULL, 2);
- GNUNET_CLIENT_disconnect (ic->client);
+ GNUNET_CLIENT_disconnect (ic->client, GNUNET_NO);
GNUNET_free (ic);
return;
}
@@ -307,7 +307,7 @@
ihc))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (ihc->client);
+ GNUNET_CLIENT_disconnect (ihc->client, GNUNET_NO);
GNUNET_free (ihc);
return NULL;
}
@@ -323,7 +323,7 @@
void
GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic)
{
- GNUNET_CLIENT_disconnect (ic->client);
+ GNUNET_CLIENT_disconnect (ic->client, GNUNET_NO);
GNUNET_free (ic);
}
@@ -406,7 +406,7 @@
if (msg == NULL)
{
- GNUNET_CLIENT_disconnect (nc->client);
+ GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
nc->client = GNUNET_CLIENT_connect (nc->sched, "peerinfo", nc->cfg);
request_notifications (nc);
return;
@@ -416,7 +416,7 @@
(ntohs (msg->type) != GNUNET_MESSAGE_TYPE_PEERINFO_INFO))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (nc->client);
+ GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
nc->client = GNUNET_CLIENT_connect (nc->sched, "peerinfo", nc->cfg);
request_notifications (nc);
return;
@@ -429,7 +429,7 @@
if (ms != sizeof (struct InfoMessage) + GNUNET_HELLO_size (hello))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (nc->client);
+ GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
nc->client = GNUNET_CLIENT_connect (nc->sched, "peerinfo", nc->cfg);
request_notifications (nc);
return;
@@ -480,7 +480,7 @@
nc->init = NULL;
if (buf == NULL)
{
- GNUNET_CLIENT_disconnect (nc->client);
+ GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
nc->client = GNUNET_CLIENT_connect (nc->sched, "peerinfo", nc->cfg);
request_notifications (nc);
return 0;
@@ -564,7 +564,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (nc->init);
nc->init = NULL;
}
- GNUNET_CLIENT_disconnect (nc->client);
+ GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
GNUNET_free (nc);
}
Modified: gnunet/src/statistics/statistics_api.c
===================================================================
--- gnunet/src/statistics/statistics_api.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/statistics/statistics_api.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -304,7 +304,7 @@
{
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = NULL;
}
#if DEBUG_STATISTICS
@@ -342,7 +342,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = NULL;
}
finish (h, GNUNET_SYSERR);
@@ -579,7 +579,7 @@
}
if (h->client != NULL)
{
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_YES);
h->client = NULL;
}
GNUNET_free (h->subsystem);
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/transport/transport_api.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -1363,7 +1363,7 @@
"Disconnecting from transport service for good.\n");
#endif
handle->client = NULL;
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_NO);
}
GNUNET_free (handle);
}
@@ -1408,7 +1408,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (h->network_handle);
h->network_handle = NULL;
}
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
h->client = NULL;
schedule_reconnect (h);
return;
Modified: gnunet/src/transport/transport_api_address_lookup.c
===================================================================
--- gnunet/src/transport/transport_api_address_lookup.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/transport/transport_api_address_lookup.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -30,7 +30,7 @@
{
/* timeout */
alucb->cb (alucb->cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client);
+ GNUNET_CLIENT_disconnect (alucb->client. GNUNET_NO);
GNUNET_free (alucb);
return;
}
@@ -48,7 +48,7 @@
/* invalid reply */
GNUNET_break_op (0);
alucb->cb (alucb->cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client);
+ GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
GNUNET_free (alucb);
return;
}
@@ -65,7 +65,7 @@
if (address == NULL)
{
/* done! */
- GNUNET_CLIENT_disconnect (alucb->client);
+ GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
GNUNET_free (alucb);
}
}
Modified: gnunet/src/transport/transport_api_blacklist.c
===================================================================
--- gnunet/src/transport/transport_api_blacklist.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/transport/transport_api_blacklist.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -243,7 +243,7 @@
static void
retry_get_notifications (struct GNUNET_TRANSPORT_BlacklistNotification *bn)
{
- GNUNET_CLIENT_disconnect (bn->client);
+ GNUNET_CLIENT_disconnect (bn->client, GNUNET_NO);
bn->client = GNUNET_CLIENT_connect (bn->sched, "transport", bn->cfg);
request_notifications (bn);
}
@@ -379,7 +379,7 @@
{
if (bn->th != NULL)
GNUNET_CLIENT_notify_transmit_ready_cancel (bn->th);
- GNUNET_CLIENT_disconnect (bn->client);
+ GNUNET_CLIENT_disconnect (bn->client, GNUNET_NO);
GNUNET_free (bn);
}
Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/client.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -350,14 +350,18 @@
* *NOT* be called, not even with a NULL message). Any pending
* transmission request will also be cancelled UNLESS the callback for
* the transmission request has already been called, in which case the
- * transmission is guaranteed to complete before the socket is fully
- * destroyed (unless, of course, there is an error with the server
- * in which case the message may still be lost).
+ * transmission 'finish_pending_write' argument determines whether or
+ * not the write is guaranteed to complete before the socket is fully
+ * destroyed (unless, of course, there is an error with the server in
+ * which case the message may still be lost).
*
+ * @param finish_pending_write should a transmission already passed to the
+ * handle be completed?
* @param sock handle to the service connection
*/
void
-GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock)
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+ int finish_pending_write)
{
GNUNET_assert (sock->sock != NULL);
if (sock->in_receive == GNUNET_YES)
@@ -365,7 +369,7 @@
GNUNET_CONNECTION_receive_cancel (sock->sock);
sock->in_receive = GNUNET_NO;
}
- GNUNET_CONNECTION_destroy (sock->sock);
+ GNUNET_CONNECTION_destroy (sock->sock, finish_pending_write);
sock->sock = NULL;
if (sock->tag != NULL)
{
@@ -551,7 +555,7 @@
struct GNUNET_MessageHeader *msg;
struct GNUNET_CLIENT_Connection *sock = cls;
- GNUNET_CLIENT_disconnect (sock);
+ GNUNET_CLIENT_disconnect (sock, GNUNET_YES);
if (size < sizeof (struct GNUNET_MessageHeader))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -627,7 +631,7 @@
{
service_test_error (conn->sched, conn->test_cb, conn->test_cb_cls);
}
- GNUNET_CLIENT_disconnect (conn);
+ GNUNET_CLIENT_disconnect (conn, GNUNET_NO);
}
@@ -710,7 +714,7 @@
_("Failure to transmit request to service `%s'\n"),
service);
service_test_error (sched, task, task_cls);
- GNUNET_CLIENT_disconnect (conn);
+ GNUNET_CLIENT_disconnect (conn, GNUNET_NO);
return;
}
}
@@ -806,7 +810,7 @@
return 0;
}
/* auto-retry */
- GNUNET_CONNECTION_destroy (th->sock->sock);
+ GNUNET_CONNECTION_destroy (th->sock->sock, GNUNET_NO);
th->sock->sock = do_connect (th->sock->sched,
th->sock->service_name, th->sock->cfg);
GNUNET_assert (NULL != th->sock->sock);
Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/common_logging.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -162,6 +162,7 @@
GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile)
{
FILE *altlog;
+ int dirwarn;
GNUNET_free_non_null (component);
GNUNET_asprintf (&component,
@@ -171,15 +172,15 @@
min_level = get_type (loglevel);
if (logfile == NULL)
return GNUNET_OK;
- if (GNUNET_OK !=
- GNUNET_DISK_directory_create_for_file (logfile))
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Failed to create or access directory for log file `%s'"),
- logfile);
+ dirwarn = (GNUNET_OK != GNUNET_DISK_directory_create_for_file (logfile));
altlog = FOPEN (logfile, "a");
if (altlog == NULL)
{
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "fopen", logfile);
+ if (dirwarn)
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("Failed to create or access directory for log file
`%s'\n"),
+ logfile);
return GNUNET_SYSERR;
}
if (GNUNET_stderr != NULL)
Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/connection.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -916,19 +916,35 @@
/**
* Close the socket and free associated resources. Pending
- * transmissions are simply dropped. A pending receive call will be
- * called with an error code of "EPIPE".
+ * transmissions may be completed or dropped depending on the
+ * arguments. If a receive call is pending and should
+ * NOT be completed, 'GNUNET_CONNECTION_receive_cancel'
+ * should be called explicitly first.
*
* @param sock socket to destroy
+ * @param finish_pending_write should pending writes be completed or aborted?
+ * (this applies to transmissions where the data has already been
+ * read from the application; all other transmissions should be
+ * aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
*/
void
-GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock)
+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;
+ }
+ }
GNUNET_assert (sock->sched != NULL);
GNUNET_SCHEDULER_add_now (sock->sched,
&destroy_continuation, sock);
@@ -1316,6 +1332,20 @@
GNUNET_assert (sock->write_task != GNUNET_SCHEDULER_NO_TASK);
sock->write_task = GNUNET_SCHEDULER_NO_TASK;
GNUNET_assert (sock->nth.timeout_task == GNUNET_SCHEDULER_NO_TASK);
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ {
+ if (sock->ignore_shutdown == GNUNET_YES)
+ goto SCHEDULE_WRITE; /* ignore shutdown, go again immediately */
+#if DEBUG_CONNECTION
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transmit to `%s' fails, shutdown happened (%p).\n",
+ GNUNET_a2s (sock->addr, sock->addrlen), sock);
+#endif
+ notify = sock->nth.notify_ready;
+ sock->nth.notify_ready = NULL;
+ notify (sock->nth.notify_ready_cls, 0, NULL);
+ return;
+ }
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
{
#if DEBUG_CONNECTION
Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/resolver_api.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -231,7 +231,7 @@
_("Timeout trying to resolve hostname `%s'.\n"),
rh->hostname);
rh->addr_callback (rh->cls, NULL, 0);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -239,7 +239,7 @@
{
GNUNET_break (0);
rh->addr_callback (rh->cls, NULL, 0);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -253,7 +253,7 @@
rh->hostname);
#endif
rh->addr_callback (rh->cls, NULL, 0);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -263,7 +263,7 @@
{
GNUNET_break (0);
rh->addr_callback (rh->cls, NULL, 0);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -488,7 +488,7 @@
&handle_address_response, rh))
{
GNUNET_free (rh);
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_NO);
return NULL;
}
return rh;
@@ -514,7 +514,7 @@
_("Timeout trying to resolve IP address `%s'.\n"),
GNUNET_a2s ((const void*) &rh[1], rh->salen));
rh->name_callback (rh->cls, NULL);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -527,7 +527,7 @@
GNUNET_a2s ((const void*) &rh[1], rh->salen));
#endif
rh->name_callback (rh->cls, NULL);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -536,7 +536,7 @@
{
GNUNET_break (0);
rh->name_callback (rh->cls, NULL);
- GNUNET_CLIENT_disconnect (rh->client);
+ GNUNET_CLIENT_disconnect (rh->client, GNUNET_NO);
GNUNET_free (rh);
return;
}
@@ -659,7 +659,7 @@
GNUNET_YES,
&handle_hostname_response, rh))
{
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_NO);
GNUNET_free (rh);
return NULL;
}
@@ -717,7 +717,7 @@
GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *h)
{
if (h->client != NULL)
- GNUNET_CLIENT_disconnect (h->client);
+ GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
if (h->task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (h->sched, h->task);
GNUNET_free (h);
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/server.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -937,7 +937,7 @@
static void
sock_destroy (void *cls)
{
- GNUNET_CONNECTION_destroy (cls);
+ GNUNET_CONNECTION_destroy (cls, GNUNET_NO);
}
Modified: gnunet/src/util/test_client.c
===================================================================
--- gnunet/src/util/test_client.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/test_client.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -113,7 +113,7 @@
msg.size = htons (sizeof (struct GNUNET_MessageHeader));
GNUNET_assert (0 ==
memcmp (got, &msg, sizeof (struct GNUNET_MessageHeader)));
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_YES);
client = NULL;
GNUNET_SERVER_destroy (server);
server = NULL;
Modified: gnunet/src/util/test_connection.c
===================================================================
--- gnunet/src/util/test_connection.c 2010-03-12 12:36:50 UTC (rev 10563)
+++ gnunet/src/util/test_connection.c 2010-03-12 13:29:05 UTC (rev 10564)
@@ -107,7 +107,7 @@
"Receive closes accepted socket\n");
#endif
*ok = 0;
- GNUNET_CONNECTION_destroy (asock);
+ GNUNET_CONNECTION_destroy (asock, GNUNET_YES);
}
}
@@ -125,7 +125,7 @@
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test destroys listen socket\n");
#endif
- GNUNET_CONNECTION_destroy (lsock);
+ GNUNET_CONNECTION_destroy (lsock, GNUNET_YES);
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Test asks to receive on accepted socket\n");
@@ -149,7 +149,7 @@
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Test destroys client socket\n");
#endif
- GNUNET_CONNECTION_destroy (csock);
+ GNUNET_CONNECTION_destroy (csock, GNUNET_YES);
return 12;
}
Modified: gnunet/src/util/test_connection_addressing.c
===================================================================
--- gnunet/src/util/test_connection_addressing.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/util/test_connection_addressing.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -102,7 +102,7 @@
else
{
*ok = 0;
- GNUNET_CONNECTION_destroy (asock);
+ GNUNET_CONNECTION_destroy (asock, GNUNET_YES);
}
}
@@ -132,7 +132,7 @@
expect.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
GNUNET_assert (0 == memcmp (&expect, v4, alen));
GNUNET_free (addr);
- GNUNET_CONNECTION_destroy (lsock);
+ GNUNET_CONNECTION_destroy (lsock, GNUNET_YES);
GNUNET_CONNECTION_receive (asock,
1024,
GNUNET_TIME_relative_multiply
@@ -172,7 +172,7 @@
12,
GNUNET_TIME_UNIT_SECONDS,
&make_hello, NULL));
- GNUNET_CONNECTION_destroy (csock);
+ GNUNET_CONNECTION_destroy (csock, GNUNET_YES);
GNUNET_SCHEDULER_add_read_net (tc->sched,
GNUNET_TIME_UNIT_FOREVER_REL,
ls, &run_accept, cls);
Modified: gnunet/src/util/test_connection_receive_cancel.c
===================================================================
--- gnunet/src/util/test_connection_receive_cancel.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/util/test_connection_receive_cancel.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -94,7 +94,7 @@
NULL, NULL, ls, 1024);
GNUNET_assert (asock != NULL);
GNUNET_assert (GNUNET_YES == GNUNET_CONNECTION_check (asock));
- GNUNET_CONNECTION_destroy (lsock);
+ GNUNET_CONNECTION_destroy (lsock, GNUNET_YES);
GNUNET_CONNECTION_receive (asock,
1024,
GNUNET_TIME_relative_multiply
@@ -108,8 +108,8 @@
{
int *ok = cls;
GNUNET_CONNECTION_receive_cancel (asock);
- GNUNET_CONNECTION_destroy (csock);
- GNUNET_CONNECTION_destroy (asock);
+ GNUNET_CONNECTION_destroy (csock, GNUNET_YES);
+ GNUNET_CONNECTION_destroy (asock, GNUNET_YES);
*ok = 0;
}
Modified: gnunet/src/util/test_connection_timeout.c
===================================================================
--- gnunet/src/util/test_connection_timeout.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/util/test_connection_timeout.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -83,8 +83,8 @@
#endif
GNUNET_assert (buf == NULL);
*ok = 0;
- GNUNET_CONNECTION_destroy (lsock);
- GNUNET_CONNECTION_destroy (csock);
+ GNUNET_CONNECTION_destroy (lsock, GNUNET_YES);
+ GNUNET_CONNECTION_destroy (csock, GNUNET_YES);
return 0;
}
#if VERBOSE
Modified: gnunet/src/util/test_connection_transmit_cancel.c
===================================================================
--- gnunet/src/util/test_connection_transmit_cancel.c 2010-03-12 12:36:50 UTC
(rev 10563)
+++ gnunet/src/util/test_connection_transmit_cancel.c 2010-03-12 13:29:05 UTC
(rev 10564)
@@ -58,7 +58,7 @@
GNUNET_TIME_UNIT_MINUTES,
¬_run, cls);
GNUNET_CONNECTION_notify_transmit_ready_cancel (th);
- GNUNET_CONNECTION_destroy (csock);
+ GNUNET_CONNECTION_destroy (csock, GNUNET_YES);
*ok = 0;
}
Modified: gnunet/src/util/test_server_disconnect.c
===================================================================
--- gnunet/src/util/test_server_disconnect.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/util/test_server_disconnect.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -119,7 +119,7 @@
GNUNET_assert (msg == NULL);
GNUNET_assert (ok == 7);
ok = 0;
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_YES);
client = NULL;
GNUNET_SERVER_destroy (server);
server = NULL;
Modified: gnunet/src/util/test_server_with_client.c
===================================================================
--- gnunet/src/util/test_server_with_client.c 2010-03-12 12:36:50 UTC (rev
10563)
+++ gnunet/src/util/test_server_with_client.c 2010-03-12 13:29:05 UTC (rev
10564)
@@ -93,7 +93,7 @@
break;
case 4:
ok++;
- GNUNET_CLIENT_disconnect (client);
+ GNUNET_CLIENT_disconnect (client, GNUNET_YES);
GNUNET_SERVER_receive_done (argclient, GNUNET_OK);
break;
default:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10564 - in gnunet/src: arm core datastore dv fs include peerinfo statistics transport util,
gnunet <=