diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-29 13:06:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-29 13:06:33 +0000 |
commit | cfd880578bd21f9adedba557291c903d325e93cd (patch) | |
tree | 3f9c7459127646523b58905e345f290867f619f6 /src/util | |
parent | 3e558d2e9f22c96328d27e5cd35a5da3866e3543 (diff) | |
download | gnunet-cfd880578bd21f9adedba557291c903d325e93cd.tar.gz gnunet-cfd880578bd21f9adedba557291c903d325e93cd.zip |
fixing #3799: only unindex if DB operations succeeded previously in the first place, and when unindexing do proper shutdown handling
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/client.c | 5 | ||||
-rw-r--r-- | src/util/os_priority.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/util/client.c b/src/util/client.c index 46bb6a86b..ad48c31a8 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -70,7 +70,7 @@ struct GNUNET_CLIENT_TransmitHandle | |||
70 | * If we are re-trying and are delaying to do so, | 70 | * If we are re-trying and are delaying to do so, |
71 | * handle to the scheduled task managing the delay. | 71 | * handle to the scheduled task managing the delay. |
72 | */ | 72 | */ |
73 | struct GNUNET_SCHEDULER_Task * reconnect_task; | 73 | struct GNUNET_SCHEDULER_Task *reconnect_task; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Timeout for the operation overall. | 76 | * Timeout for the operation overall. |
@@ -1108,6 +1108,7 @@ client_delayed_retry (void *cls, | |||
1108 | "Transmission failed %u times, trying again in %s.\n", | 1108 | "Transmission failed %u times, trying again in %s.\n", |
1109 | MAX_ATTEMPTS - th->attempts_left, | 1109 | MAX_ATTEMPTS - th->attempts_left, |
1110 | GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); | 1110 | GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); |
1111 | GNUNET_assert (NULL == th->th); | ||
1111 | GNUNET_assert (NULL == th->reconnect_task); | 1112 | GNUNET_assert (NULL == th->reconnect_task); |
1112 | th->reconnect_task = | 1113 | th->reconnect_task = |
1113 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); | 1114 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); |
@@ -1191,6 +1192,7 @@ client_notify (void *cls, | |||
1191 | GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); | 1192 | GNUNET_STRINGS_relative_time_to_string (delay, GNUNET_YES)); |
1192 | client->th = th; | 1193 | client->th = th; |
1193 | GNUNET_assert (NULL == th->reconnect_task); | 1194 | GNUNET_assert (NULL == th->reconnect_task); |
1195 | GNUNET_assert (NULL == th->th); | ||
1194 | th->reconnect_task = | 1196 | th->reconnect_task = |
1195 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); | 1197 | GNUNET_SCHEDULER_add_delayed (delay, &client_delayed_retry, th); |
1196 | return 0; | 1198 | return 0; |
@@ -1259,6 +1261,7 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *client, | |||
1259 | client->th = th; | 1261 | client->th = th; |
1260 | if (NULL == client->connection) | 1262 | if (NULL == client->connection) |
1261 | { | 1263 | { |
1264 | GNUNET_assert (NULL == th->th); | ||
1262 | GNUNET_assert (NULL == th->reconnect_task); | 1265 | GNUNET_assert (NULL == th->reconnect_task); |
1263 | th->reconnect_task = | 1266 | th->reconnect_task = |
1264 | GNUNET_SCHEDULER_add_delayed (client->back_off, | 1267 | GNUNET_SCHEDULER_add_delayed (client->back_off, |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 480ca09bb..065009ae5 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -492,6 +492,7 @@ open_dev_null (int target_fd, | |||
492 | * (when they are non-NULL). | 492 | * (when they are non-NULL). |
493 | * @param pipe_stdin pipe to use to send input to child process (or NULL) | 493 | * @param pipe_stdin pipe to use to send input to child process (or NULL) |
494 | * @param pipe_stdout pipe to use to get output from child process (or NULL) | 494 | * @param pipe_stdout pipe to use to get output from child process (or NULL) |
495 | * @param pipe_stderr pipe to use for stderr for child process (or NULL) | ||
495 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); | 496 | * @param lsocks array of listen sockets to dup systemd-style (or NULL); |
496 | * must be NULL on platforms where dup is not supported | 497 | * must be NULL on platforms where dup is not supported |
497 | * @param filename name of the binary | 498 | * @param filename name of the binary |