diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-23 10:06:07 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-23 10:06:07 +0000 |
commit | f76e7c10d09a037ffd102a0f4998ba86c5e14f97 (patch) | |
tree | 7e60558b8dfb8223c0b2dc6e9ddcbe9d18bf5e4f /src/util | |
parent | f44c0036572d5557d2496748a4190a61e40e61ff (diff) | |
download | gnunet-f76e7c10d09a037ffd102a0f4998ba86c5e14f97.tar.gz gnunet-f76e7c10d09a037ffd102a0f4998ba86c5e14f97.zip |
getting rid of unnecessary ignore_shutdown calls
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/client.c | 23 | ||||
-rw-r--r-- | src/util/connection.c | 3 |
2 files changed, 2 insertions, 24 deletions
diff --git a/src/util/client.c b/src/util/client.c index 5d5387ef9..d2f347947 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -242,11 +242,6 @@ struct GNUNET_CLIENT_Connection | |||
242 | int in_receive; | 242 | int in_receive; |
243 | 243 | ||
244 | /** | 244 | /** |
245 | * Are we ignoring shutdown signals? | ||
246 | */ | ||
247 | int ignore_shutdown; | ||
248 | |||
249 | /** | ||
250 | * How often have we tried to connect? | 245 | * How often have we tried to connect? |
251 | */ | 246 | */ |
252 | unsigned int attempts; | 247 | unsigned int attempts; |
@@ -382,22 +377,6 @@ GNUNET_CLIENT_connect (const char *service_name, | |||
382 | 377 | ||
383 | 378 | ||
384 | /** | 379 | /** |
385 | * Configure this connection to ignore shutdown signals. | ||
386 | * | ||
387 | * @param h client handle | ||
388 | * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default | ||
389 | */ | ||
390 | void | ||
391 | GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h, | ||
392 | int do_ignore) | ||
393 | { | ||
394 | h->ignore_shutdown = do_ignore; | ||
395 | if (h->sock != NULL) | ||
396 | GNUNET_CONNECTION_ignore_shutdown (h->sock, do_ignore); | ||
397 | } | ||
398 | |||
399 | |||
400 | /** | ||
401 | * Destroy connection with the service. This will automatically | 380 | * Destroy connection with the service. This will automatically |
402 | * cancel any pending "receive" request (however, the handler will | 381 | * cancel any pending "receive" request (however, the handler will |
403 | * *NOT* be called, not even with a NULL message). Any pending | 382 | * *NOT* be called, not even with a NULL message). Any pending |
@@ -960,8 +939,6 @@ client_delayed_retry (void *cls, | |||
960 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); | 939 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); |
961 | return; | 940 | return; |
962 | } | 941 | } |
963 | GNUNET_CONNECTION_ignore_shutdown (th->sock->sock, | ||
964 | th->sock->ignore_shutdown); | ||
965 | th->th = | 942 | th->th = |
966 | GNUNET_CONNECTION_notify_transmit_ready (th->sock->sock, th->size, | 943 | GNUNET_CONNECTION_notify_transmit_ready (th->sock->sock, th->size, |
967 | GNUNET_TIME_absolute_get_remaining | 944 | GNUNET_TIME_absolute_get_remaining |
diff --git a/src/util/connection.c b/src/util/connection.c index 4beafa3f3..cd0035a8f 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -1495,7 +1495,8 @@ transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1495 | GNUNET_assert (sock->nth.timeout_task == GNUNET_SCHEDULER_NO_TASK); | 1495 | GNUNET_assert (sock->nth.timeout_task == GNUNET_SCHEDULER_NO_TASK); |
1496 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1496 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1497 | { | 1497 | { |
1498 | if (sock->ignore_shutdown == GNUNET_YES) | 1498 | if ( (sock->ignore_shutdown == GNUNET_YES) && |
1499 | (NULL != sock->sock) ) | ||
1499 | goto SCHEDULE_WRITE; /* ignore shutdown, go again immediately */ | 1500 | goto SCHEDULE_WRITE; /* ignore shutdown, go again immediately */ |
1500 | #if DEBUG_CONNECTION | 1501 | #if DEBUG_CONNECTION |
1501 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1502 | LOG (GNUNET_ERROR_TYPE_DEBUG, |