diff options
-rw-r--r-- | src/vpn/gnunet-daemon-exit.c | 2 | ||||
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-helper.c | 3 | ||||
-rw-r--r-- | src/vpn/gnunet-helper-vpn-api.c | 6 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index 08b414d5c..d12c59d20 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c | |||
@@ -36,6 +36,8 @@ | |||
36 | #include "gnunet-helper-vpn-api.h" | 36 | #include "gnunet-helper-vpn-api.h" |
37 | #include "gnunet-vpn-checksum.h" | 37 | #include "gnunet-vpn-checksum.h" |
38 | 38 | ||
39 | GNUNET_SCHEDULER_TaskIdentifier shs_task; | ||
40 | |||
39 | /** | 41 | /** |
40 | * The handle to the configuration used throughout the process | 42 | * The handle to the configuration used throughout the process |
41 | */ | 43 | */ |
diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index 9a1ddd8cc..e5fb59c00 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c | |||
@@ -126,6 +126,8 @@ start_helper_and_schedule(void *cls, | |||
126 | restart_hijack = 1; | 126 | restart_hijack = 1; |
127 | if (NULL != dns_connection) | 127 | if (NULL != dns_connection) |
128 | GNUNET_CLIENT_notify_transmit_ready(dns_connection, sizeof(struct GNUNET_MessageHeader), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL); | 128 | GNUNET_CLIENT_notify_transmit_ready(dns_connection, sizeof(struct GNUNET_MessageHeader), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, NULL); |
129 | |||
130 | GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, helper_handle->fh_to_helper, &helper_write, NULL); | ||
129 | } | 131 | } |
130 | /*}}}*/ | 132 | /*}}}*/ |
131 | 133 | ||
@@ -410,5 +412,6 @@ void write_to_helper(void* buf, size_t len) | |||
410 | 412 | ||
411 | void schedule_helper_write(struct GNUNET_TIME_Relative time, void* cls) | 413 | void schedule_helper_write(struct GNUNET_TIME_Relative time, void* cls) |
412 | { | 414 | { |
415 | if (GNUNET_SCHEDULER_NO_TASK == shs_task) return; | ||
413 | GNUNET_SCHEDULER_add_write_file (time, helper_handle->fh_to_helper, &helper_write, cls); | 416 | GNUNET_SCHEDULER_add_write_file (time, helper_handle->fh_to_helper, &helper_write, cls); |
414 | } | 417 | } |
diff --git a/src/vpn/gnunet-helper-vpn-api.c b/src/vpn/gnunet-helper-vpn-api.c index 195a79217..1022d54e9 100644 --- a/src/vpn/gnunet-helper-vpn-api.c +++ b/src/vpn/gnunet-helper-vpn-api.c | |||
@@ -48,6 +48,8 @@ stop_helper (struct GNUNET_VPN_HELPER_Handle *handle) | |||
48 | GNUNET_SERVER_mst_destroy(handle->mst); | 48 | GNUNET_SERVER_mst_destroy(handle->mst); |
49 | } | 49 | } |
50 | 50 | ||
51 | extern GNUNET_SCHEDULER_TaskIdentifier shs_task; | ||
52 | |||
51 | /** | 53 | /** |
52 | * Read from the helper-process | 54 | * Read from the helper-process |
53 | */ | 55 | */ |
@@ -71,7 +73,7 @@ helper_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx) | |||
71 | stop_helper (handle); | 73 | stop_helper (handle); |
72 | 74 | ||
73 | /* Restart the helper */ | 75 | /* Restart the helper */ |
74 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 76 | shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
75 | handle->restart_task, handle); | 77 | handle->restart_task, handle); |
76 | return; | 78 | return; |
77 | } | 79 | } |
@@ -84,7 +86,7 @@ helper_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx) | |||
84 | stop_helper (handle); | 86 | stop_helper (handle); |
85 | 87 | ||
86 | /* Restart the helper */ | 88 | /* Restart the helper */ |
87 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 89 | shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
88 | handle->restart_task, handle); | 90 | handle->restart_task, handle); |
89 | return; | 91 | return; |
90 | 92 | ||