[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21019 - in gnunet/src: arm ats core datastore dht dns fs g
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21019 - in gnunet/src: arm ats core datastore dht dns fs gns include mesh namestore nat nse peerinfo statistics transport util vpn |
Date: |
Thu, 19 Apr 2012 10:53:46 +0200 |
Author: grothoff
Date: 2012-04-19 10:53:46 +0200 (Thu, 19 Apr 2012)
New Revision: 21019
Modified:
gnunet/src/arm/arm_api.c
gnunet/src/arm/test_exponential_backoff.c
gnunet/src/ats/ats_api_performance.c
gnunet/src/ats/ats_api_scheduling.c
gnunet/src/core/core_api.c
gnunet/src/core/core_api_iterate_peers.c
gnunet/src/datastore/datastore_api.c
gnunet/src/dht/dht_api.c
gnunet/src/dns/dns_api.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/gns/gns_api.c
gnunet/src/include/gnunet_client_lib.h
gnunet/src/mesh/mesh_api.c
gnunet/src/namestore/namestore_api.c
gnunet/src/nat/nat_test.c
gnunet/src/nse/nse_api.c
gnunet/src/peerinfo/peerinfo_api.c
gnunet/src/peerinfo/peerinfo_api_notify.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_address_to_string.c
gnunet/src/transport/transport_api_blacklist.c
gnunet/src/util/client.c
gnunet/src/util/connection.c
gnunet/src/util/resolver_api.c
gnunet/src/util/test_client.c
gnunet/src/util/test_server.c
gnunet/src/util/test_server_disconnect.c
gnunet/src/util/test_server_with_client.c
gnunet/src/util/test_server_with_client_unix.c
gnunet/src/util/test_service.c
gnunet/src/vpn/vpn_api.c
Log:
-removing 2nd argument from GNUNET_CLIENT_disconnect as it was virtually always
GNUNET_NO --- and all other uses indicate design problems
Modified: gnunet/src/arm/arm_api.c
===================================================================
--- gnunet/src/arm/arm_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/arm/arm_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -128,7 +128,7 @@
}
}
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
return;
}
@@ -142,7 +142,7 @@
/* ARM is not shutting down, well, report the error and be done with
it... */
shutdown_ctx->cont (shutdown_ctx->cont_cls, shutdown_ctx->confirmed);
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
return;
}
@@ -165,7 +165,7 @@
struct ShutdownContext *shutdown_ctx = cls;
shutdown_ctx->cont (shutdown_ctx->cont_cls,
GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
}
@@ -191,7 +191,7 @@
LOG (GNUNET_ERROR_TYPE_WARNING,
_("Failed to transmit shutdown request to client.\n"));
shutdown_ctx->cont (shutdown_ctx->cont_cls,
GNUNET_ARM_PROCESS_COMMUNICATION_ERROR);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
return 0; /* client disconnected */
}
@@ -273,7 +273,7 @@
GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h)
{
if (h->client != NULL)
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
GNUNET_CONFIGURATION_destroy (h->cfg);
GNUNET_free (h);
}
@@ -471,7 +471,7 @@
("Error receiving response to `%s' request from ARM for service
`%s'\n"),
(sc->type == GNUNET_MESSAGE_TYPE_ARM_START) ? "START" : "STOP",
(const char *) &sc[1]);
- GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->h->client);
sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg);
GNUNET_assert (NULL != sc->h->client);
if (sc->callback != NULL)
@@ -730,7 +730,7 @@
{
LOG (GNUNET_ERROR_TYPE_WARNING,
"Error receiving response to LIST request from ARM\n");
- GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->h->client);
sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg);
GNUNET_assert (NULL != sc->h->client);
if (sc->callback != NULL)
Modified: gnunet/src/arm/test_exponential_backoff.c
===================================================================
--- gnunet/src/arm/test_exponential_backoff.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/arm/test_exponential_backoff.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -121,7 +121,7 @@
if (shutdown_ctx->cont != NULL)
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR);
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
}
else if ((msg == NULL) && (shutdown_ctx->confirmed == GNUNET_YES))
@@ -133,7 +133,7 @@
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO);
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
}
else
@@ -159,7 +159,7 @@
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_YES);
GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
break;
}
@@ -180,7 +180,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "service_shutdown_cancel called!\n");
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
}
@@ -205,7 +205,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Failed to transmit shutdown request to client.\n"));
shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR);
- GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (shutdown_ctx->sock);
GNUNET_free (shutdown_ctx);
return 0; /* client disconnected */
}
@@ -358,7 +358,7 @@
GNUNET_assert (doNothingConnection != NULL);
if (trialCount == 12)
{
- GNUNET_CLIENT_disconnect (doNothingConnection, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (doNothingConnection);
GNUNET_ARM_stop_service (arm, "do-nothing", TIMEOUT, &arm_notify_stop,
NULL);
ok = 0;
Modified: gnunet/src/ats/ats_api_performance.c
===================================================================
--- gnunet/src/ats/ats_api_performance.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/ats/ats_api_performance.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -395,7 +395,7 @@
GNUNET_TIME_UNIT_FOREVER_REL);
return;
reconnect:
- GNUNET_CLIENT_disconnect (ph->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (ph->client);
ph->client = NULL;
ph->task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task,
@@ -493,7 +493,7 @@
}
if (NULL != ph->client)
{
- GNUNET_CLIENT_disconnect (ph->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (ph->client);
ph->client = NULL;
}
GNUNET_free (ph);
Modified: gnunet/src/ats/ats_api_scheduling.c
===================================================================
--- gnunet/src/ats/ats_api_scheduling.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/ats/ats_api_scheduling.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -27,7 +27,6 @@
#include "gnunet_ats_service.h"
#include "ats.h"
-#define DEBUG_ATS GNUNET_EXTRA_LOGGING
#define INTERFACE_PROCESSING_INTERVALL GNUNET_TIME_relative_multiply
(GNUNET_TIME_UNIT_SECONDS, 1)
@@ -213,7 +212,7 @@
force_reconnect (struct GNUNET_ATS_SchedulingHandle *sh)
{
sh->reconnect = GNUNET_NO;
- GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sh->client);
sh->client = NULL;
sh->task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task,
@@ -918,7 +917,7 @@
}
if (NULL != sh->client)
{
- GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sh->client);
sh->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != sh->task)
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/core/core_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -448,7 +448,7 @@
}
if (h->client != NULL)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
h->currently_down = GNUNET_YES;
@@ -1243,7 +1243,7 @@
}
if (handle->client != NULL)
{
- GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (handle->client);
handle->client = NULL;
}
GNUNET_CONTAINER_multihashmap_iterate (handle->peers,
Modified: gnunet/src/core/core_api_iterate_peers.c
===================================================================
--- gnunet/src/core/core_api_iterate_peers.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/core/core_api_iterate_peers.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -80,7 +80,7 @@
{
if (request_context->peer_cb != NULL)
request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0);
- GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (request_context->client);
GNUNET_free (request_context);
return;
}
@@ -93,7 +93,7 @@
GNUNET_break (0);
if (request_context->peer_cb != NULL)
request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0);
- GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (request_context->client);
GNUNET_free (request_context);
return;
}
@@ -106,7 +106,7 @@
GNUNET_break (0);
if (request_context->peer_cb != NULL)
request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0);
- GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (request_context->client);
GNUNET_free (request_context);
return;
}
Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/datastore/datastore_api.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -321,7 +321,7 @@
}
if (h->client != NULL)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
@@ -346,7 +346,7 @@
GNUNET_TIME_UNIT_MINUTES,
GNUNET_YES, &transmit_drop, h))
return;
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
GNUNET_break (0);
@@ -540,7 +540,7 @@
GNUNET_STATISTICS_update (stats, gettext_noop ("# reconnected to DATASTORE"),
1, GNUNET_NO);
#endif
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->skip_next_messages = 0;
h->client = NULL;
h->reconnect_task =
Modified: gnunet/src/dht/dht_api.c
===================================================================
--- gnunet/src/dht/dht_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/dht/dht_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -368,7 +368,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Disconnecting from DHT service, will try to reconnect in %llu
ms\n",
(unsigned long long) handle->retry_time.rel_value);
- GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (handle->client);
handle->client = NULL;
handle->reconnect_task =
GNUNET_SCHEDULER_add_delayed (handle->retry_time, &try_reconnect,
handle);
@@ -701,7 +701,7 @@
}
if (handle->client != NULL)
{
- GNUNET_CLIENT_disconnect (handle->client, GNUNET_YES);
+ GNUNET_CLIENT_disconnect (handle->client);
handle->client = NULL;
}
if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
@@ -735,7 +735,11 @@
/**
- * Perform a PUT operation storing data in the DHT.
+ * Perform a PUT operation storing data in the DHT. FIXME: we should
+ * change the protocol to get a confirmation for the PUT from the DHT
+ * and call 'cont' only after getting the confirmation; otherwise, the
+ * client has no good way of telling if the 'PUT' message actually got
+ * to the DHT service!
*
* @param handle handle to DHT service
* @param key the key to store under
Modified: gnunet/src/dns/dns_api.c
===================================================================
--- gnunet/src/dns/dns_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/dns/dns_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -202,7 +202,7 @@
}
if (NULL != dh->dns_connection)
{
- GNUNET_CLIENT_disconnect (dh->dns_connection, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (dh->dns_connection);
dh->dns_connection = NULL;
}
while (NULL != (qe = dh->rq_head))
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/fs/fs_download.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -1166,7 +1166,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th);
dc->th = NULL;
}
- GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (dc->client);
dc->in_receive = GNUNET_NO;
dc->client = NULL;
GNUNET_FS_free_download_request_ (dc->top_request);
@@ -1404,7 +1404,7 @@
dc->pending_head = NULL;
dc->pending_tail = NULL;
GNUNET_CONTAINER_multihashmap_iterate (dc->active, &retry_entry, dc);
- GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (dc->client);
dc->in_receive = GNUNET_NO;
dc->client = NULL;
}
@@ -1471,7 +1471,7 @@
}
if (NULL != dc->client)
{
- GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (dc->client);
dc->in_receive = GNUNET_NO;
dc->client = NULL;
}
Modified: gnunet/src/fs/fs_list_indexed.c
===================================================================
--- gnunet/src/fs/fs_list_indexed.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/fs/fs_list_indexed.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -176,7 +176,7 @@
void
GNUNET_FS_get_indexed_files_cancel (struct GNUNET_FS_GetIndexedContext *gic)
{
- GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (gic->client);
GNUNET_free (gic);
}
Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/fs/fs_publish.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -98,7 +98,7 @@
}
if (pc->client != NULL)
{
- GNUNET_CLIENT_disconnect (pc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (pc->client);
pc->client = NULL;
}
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task);
@@ -611,7 +611,7 @@
const char *emsg;
uint16_t msize;
- GNUNET_CLIENT_disconnect (pc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (pc->client);
pc->client = NULL;
p = pc->fi_pos;
if (msg == NULL)
Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/fs/fs_search.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -30,7 +30,6 @@
#include "gnunet_protocols.h"
#include "fs_api.h"
-#define DEBUG_SEARCH GNUNET_EXTRA_LOGGING
/**
* Number of availability trials we perform per search result.
@@ -1152,7 +1151,7 @@
{
if (NULL != sc->client)
{
- GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->client);
sc->client = NULL;
}
sc->task =
@@ -1369,7 +1368,7 @@
if (sc->task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sc->task);
if (NULL != sc->client)
- GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->client);
GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
if (sc->requests != NULL)
{
@@ -1425,7 +1424,7 @@
GNUNET_SCHEDULER_cancel (sc->task);
sc->task = GNUNET_SCHEDULER_NO_TASK;
if (NULL != sc->client)
- GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->client);
sc->client = NULL;
GNUNET_FS_search_sync_ (sc);
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
@@ -1569,7 +1568,7 @@
if (sc->task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (sc->task);
if (NULL != sc->client)
- GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (sc->client);
GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map,
&search_result_free, sc);
GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map);
Modified: gnunet/src/fs/fs_unindex.c
===================================================================
--- gnunet/src/fs/fs_unindex.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/fs/fs_unindex.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -223,7 +223,7 @@
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (uc->state != UNINDEX_STATE_FS_NOTIFY)
@@ -708,7 +708,7 @@
}
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (NULL != uc->dsh)
@@ -803,7 +803,7 @@
}
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (NULL != uc->dsh)
Modified: gnunet/src/gns/gns_api.c
===================================================================
--- gnunet/src/gns/gns_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/gns/gns_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -229,7 +229,7 @@
force_reconnect (struct GNUNET_GNS_Handle *h)
{
h->reconnect = GNUNET_NO;
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&reconnect_task,
@@ -610,7 +610,7 @@
void
GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle)
{
- GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (handle->client);
if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task)
{
GNUNET_SCHEDULER_cancel (handle->reconnect_task);
Modified: gnunet/src/include/gnunet_client_lib.h
===================================================================
--- gnunet/src/include/gnunet_client_lib.h 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/include/gnunet_client_lib.h 2012-04-19 08:53:46 UTC (rev
21019)
@@ -70,12 +70,9 @@
* 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,
- int finish_pending_write);
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock);
/**
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/mesh/mesh_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -675,7 +675,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
}
/* connect again */
@@ -1375,7 +1375,7 @@
}
if (NULL != handle->client)
{
- GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (handle->client);
handle->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task)
Modified: gnunet/src/namestore/namestore_api.c
===================================================================
--- gnunet/src/namestore/namestore_api.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/namestore/namestore_api.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -35,7 +35,6 @@
#include "gnunet_namestore_service.h"
#include "namestore.h"
-#define DEBUG_GNS_API GNUNET_EXTRA_LOGGING
#define LOG(kind,...) GNUNET_log_from (kind, "gns-api",__VA_ARGS__)
@@ -864,7 +863,7 @@
force_reconnect (struct GNUNET_NAMESTORE_Handle *h)
{
h->reconnect = GNUNET_NO;
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
&reconnect_task,
@@ -926,7 +925,7 @@
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task)
Modified: gnunet/src/nat/nat_test.c
===================================================================
--- gnunet/src/nat/nat_test.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/nat/nat_test.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -460,7 +460,7 @@
while (NULL != (cpos = tst->ca_head))
{
GNUNET_CONTAINER_DLL_remove (tst->ca_head, tst->ca_tail, cpos);
- GNUNET_CLIENT_disconnect (cpos->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (cpos->client);
GNUNET_free (cpos);
}
while (NULL != (pos = tst->na_head))
Modified: gnunet/src/nse/nse_api.c
===================================================================
--- gnunet/src/nse/nse_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/nse/nse_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -106,7 +106,7 @@
if (msg == NULL)
{
/* Error, timeout, death */
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
h->reconnect_task =
GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h);
@@ -145,7 +145,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
@@ -289,7 +289,7 @@
}
if (h->client != NULL)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
GNUNET_free (h);
Modified: gnunet/src/peerinfo/peerinfo_api.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/peerinfo/peerinfo_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -172,7 +172,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != h->r_task)
@@ -238,7 +238,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_SYSERR);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
h->client = GNUNET_CLIENT_connect ("peerinfo", h->cfg);
Modified: gnunet/src/peerinfo/peerinfo_api_notify.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api_notify.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/peerinfo/peerinfo_api_notify.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -133,7 +133,7 @@
if (msg == NULL)
{
- GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (nc->client);
reconnect (nc, NULL);
return;
}
@@ -142,7 +142,7 @@
(ntohs (msg->type) != GNUNET_MESSAGE_TYPE_PEERINFO_INFO))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (nc->client);
nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg);
request_notifications (nc);
return;
@@ -155,7 +155,7 @@
if (ms != sizeof (struct InfoMessage) + GNUNET_HELLO_size (hello))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (nc->client);
nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg);
request_notifications (nc);
return;
@@ -200,7 +200,7 @@
nc->init = NULL;
if (buf == NULL)
{
- GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (nc->client);
nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg);
request_notifications (nc);
return 0;
@@ -281,7 +281,7 @@
nc->init = NULL;
}
if (NULL != nc->client)
- GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (nc->client);
if (GNUNET_SCHEDULER_NO_TASK != nc->task)
GNUNET_SCHEDULER_cancel (nc->task);
GNUNET_free (nc);
Modified: gnunet/src/statistics/statistics_api.c
===================================================================
--- gnunet/src/statistics/statistics_api.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/statistics/statistics_api.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -337,7 +337,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
h->receiving = GNUNET_NO;
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/transport/transport_api.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -940,7 +940,7 @@
}
if (NULL != h->client)
{
- GNUNET_CLIENT_disconnect (h->client, GNUNET_YES);
+ GNUNET_CLIENT_disconnect (h->client);
h->client = NULL;
}
/* Forget about all neighbours that we used to be connected to */
Modified: gnunet/src/transport/transport_api_address_lookup.c
===================================================================
--- gnunet/src/transport/transport_api_address_lookup.c 2012-04-19 08:38:42 UTC
(rev 21018)
+++ gnunet/src/transport/transport_api_address_lookup.c 2012-04-19 08:53:46 UTC
(rev 21019)
@@ -155,7 +155,7 @@
reconnect (struct GNUNET_TRANSPORT_PeerIterateContext *pal_ctx)
{
GNUNET_assert (GNUNET_NO == pal_ctx->one_shot);
- GNUNET_CLIENT_disconnect (pal_ctx->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (pal_ctx->client);
pal_ctx->client = NULL;
pal_ctx->backoff = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS,
GNUNET_TIME_relative_min
(GNUNET_TIME_relative_multiply (pal_ctx->backoff, 2),
@@ -354,7 +354,7 @@
{
if (NULL != alc->client)
{
- GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (alc->client);
alc->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != alc->reconnect_task)
Modified: gnunet/src/transport/transport_api_address_to_string.c
===================================================================
--- gnunet/src/transport/transport_api_address_to_string.c 2012-04-19
08:38:42 UTC (rev 21018)
+++ gnunet/src/transport/transport_api_address_to_string.c 2012-04-19
08:53:46 UTC (rev 21019)
@@ -71,7 +71,7 @@
if (msg == NULL)
{
alucb->cb (alucb->cb_cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (alucb->client);
GNUNET_free (alucb);
return;
}
@@ -82,7 +82,7 @@
{
/* done! */
alucb->cb (alucb->cb_cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (alucb->client);
GNUNET_free (alucb);
return;
}
@@ -92,7 +92,7 @@
/* invalid reply */
GNUNET_break (0);
alucb->cb (alucb->cb_cls, NULL);
- GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (alucb->client);
GNUNET_free (alucb);
return;
}
@@ -180,7 +180,7 @@
GNUNET_TRANSPORT_AddressToStringContext
*alc)
{
- GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (alc->client);
GNUNET_free (alc);
}
Modified: gnunet/src/transport/transport_api_blacklist.c
===================================================================
--- gnunet/src/transport/transport_api_blacklist.c 2012-04-19 08:38:42 UTC
(rev 21018)
+++ gnunet/src/transport/transport_api_blacklist.c 2012-04-19 08:53:46 UTC
(rev 21019)
@@ -168,7 +168,7 @@
reconnect (struct GNUNET_TRANSPORT_Blacklist *br)
{
if (br->client != NULL)
- GNUNET_CLIENT_disconnect (br->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (br->client);
br->client = GNUNET_CLIENT_connect ("transport", br->cfg);
GNUNET_assert (br->client != NULL);
br->th =
@@ -288,7 +288,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (br->th);
br->th = NULL;
}
- GNUNET_CLIENT_disconnect (br->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (br->client);
GNUNET_free (br);
}
Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/client.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -389,13 +389,10 @@
* 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,
- int finish_pending_write)
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock)
{
if (sock->in_receive == GNUNET_YES)
{
@@ -409,7 +406,7 @@
}
if (NULL != sock->sock)
{
- GNUNET_CONNECTION_destroy (sock->sock, finish_pending_write);
+ GNUNET_CONNECTION_destroy (sock->sock, GNUNET_NO);
sock->sock = NULL;
}
if (sock->receive_task != GNUNET_SCHEDULER_NO_TASK)
@@ -619,7 +616,7 @@
{
service_test_error (conn->test_cb, conn->test_cb_cls);
}
- GNUNET_CLIENT_disconnect (conn, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (conn);
}
@@ -642,7 +639,7 @@
{
LOG (GNUNET_ERROR_TYPE_DEBUG, _("Failure to transmit TEST request.\n"));
service_test_error (conn->test_cb, conn->test_cb_cls);
- GNUNET_CLIENT_disconnect (conn, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (conn);
return 0; /* client disconnected */
}
LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting `%s' request.\n", "TEST");
@@ -855,7 +852,7 @@
LOG (GNUNET_ERROR_TYPE_WARNING,
_("Failure to transmit request to service `%s'\n"), service);
service_test_error (task, task_cls);
- GNUNET_CLIENT_disconnect (conn, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (conn);
return;
}
}
Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/connection.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -323,6 +323,7 @@
return GNUNET_NETWORK_socket_disable_corking (sock->sock);
}
+
/**
* Create a socket handle by boxing an existing OS socket. The OS
* socket should henceforth be no longer used directly.
@@ -477,6 +478,7 @@
return ret;
}
+
/**
* Obtain the network address of the other party.
*
@@ -1041,7 +1043,6 @@
GNUNET_RESOLVER_request_cancel (sock->dns_active);
sock->dns_active = NULL;
}
-
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->destroy_task);
sock->destroy_task = GNUNET_SCHEDULER_add_now (&destroy_continuation, sock);
}
Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/resolver_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -253,7 +253,7 @@
#if DEBUG_RESOLVER
LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from DNS service\n");
#endif
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
}
if (r_task != GNUNET_SCHEDULER_NO_TASK)
@@ -374,7 +374,7 @@
}
GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh);
GNUNET_free (rh);
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
reconnect ();
return;
@@ -382,7 +382,7 @@
if (GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE != ntohs (msg->type))
{
GNUNET_break (0);
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
reconnect ();
return;
@@ -417,7 +417,7 @@
rh->name_callback (rh->cls, NULL);
GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh);
GNUNET_free (rh);
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
reconnect ();
return;
@@ -473,7 +473,7 @@
rh->addr_callback (rh->cls, NULL, 0);
GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh);
GNUNET_free (rh);
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
reconnect ();
return;
@@ -643,7 +643,7 @@
(rh->timeout), GNUNET_YES,
&handle_response, rh))
{
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
reconnect ();
return;
Modified: gnunet/src/util/test_client.c
===================================================================
--- gnunet/src/util/test_client.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/test_client.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -109,7 +109,7 @@
msg.type = htons (MY_TYPE);
msg.size = htons (sizeof (struct GNUNET_MessageHeader));
GNUNET_assert (0 == memcmp (got, &msg, sizeof (struct
GNUNET_MessageHeader)));
- GNUNET_CLIENT_disconnect (client, GNUNET_YES);
+ GNUNET_CLIENT_disconnect (client);
client = NULL;
GNUNET_SERVER_destroy (server);
server = NULL;
Modified: gnunet/src/util/test_server.c
===================================================================
--- gnunet/src/util/test_server.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/test_server.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -54,7 +54,7 @@
GNUNET_assert (ok == 6);
ok = 0;
GNUNET_SERVER_destroy (server);
- GNUNET_CLIENT_disconnect (cc, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (cc);
GNUNET_CONFIGURATION_destroy (cfg);
}
Modified: gnunet/src/util/test_server_disconnect.c
===================================================================
--- gnunet/src/util/test_server_disconnect.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/util/test_server_disconnect.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -51,7 +51,7 @@
GNUNET_assert (ok == 5);
ok = 0;
GNUNET_SERVER_destroy (server);
- GNUNET_CLIENT_disconnect (cc, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (cc);
GNUNET_CONFIGURATION_destroy (cfg);
}
Modified: gnunet/src/util/test_server_with_client.c
===================================================================
--- gnunet/src/util/test_server_with_client.c 2012-04-19 08:38:42 UTC (rev
21018)
+++ gnunet/src/util/test_server_with_client.c 2012-04-19 08:53:46 UTC (rev
21019)
@@ -89,7 +89,7 @@
break;
case 4:
ok++;
- GNUNET_CLIENT_disconnect (client, GNUNET_YES);
+ GNUNET_CLIENT_disconnect (client);
GNUNET_SERVER_receive_done (argclient, GNUNET_OK);
break;
default:
Modified: gnunet/src/util/test_server_with_client_unix.c
===================================================================
--- gnunet/src/util/test_server_with_client_unix.c 2012-04-19 08:38:42 UTC
(rev 21018)
+++ gnunet/src/util/test_server_with_client_unix.c 2012-04-19 08:53:46 UTC
(rev 21019)
@@ -68,7 +68,7 @@
break;
case 4:
ok++;
- GNUNET_CLIENT_disconnect (client, GNUNET_YES);
+ GNUNET_CLIENT_disconnect (client);
GNUNET_SERVER_receive_done (argclient, GNUNET_OK);
break;
default:
Modified: gnunet/src/util/test_service.c
===================================================================
--- gnunet/src/util/test_service.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/util/test_service.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -52,7 +52,7 @@
GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
msg->type = htons (MY_TYPE);
msg->size = htons (sizeof (struct GNUNET_MessageHeader));
- GNUNET_CLIENT_disconnect (client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (client);
return sizeof (struct GNUNET_MessageHeader);
}
Modified: gnunet/src/vpn/vpn_api.c
===================================================================
--- gnunet/src/vpn/vpn_api.c 2012-04-19 08:38:42 UTC (rev 21018)
+++ gnunet/src/vpn/vpn_api.c 2012-04-19 08:53:46 UTC (rev 21019)
@@ -402,7 +402,7 @@
GNUNET_CLIENT_notify_transmit_ready_cancel (vh->th);
vh->th = NULL;
}
- GNUNET_CLIENT_disconnect (vh->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (vh->client);
vh->client = NULL;
vh->request_id_gen = 0;
for (rr = vh->rr_head; NULL != rr; rr = rr->next)
@@ -591,7 +591,7 @@
}
if (NULL != vh->client)
{
- GNUNET_CLIENT_disconnect (vh->client, GNUNET_NO);
+ GNUNET_CLIENT_disconnect (vh->client);
vh->client = NULL;
}
if (GNUNET_SCHEDULER_NO_TASK != vh->rt)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21019 - in gnunet/src: arm ats core datastore dht dns fs gns include mesh namestore nat nse peerinfo statistics transport util vpn,
gnunet <=