diff options
author | Philipp Tölke <toelke@in.tum.de> | 2011-04-10 13:19:29 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2011-04-10 13:19:29 +0000 |
commit | 19ee99ab594b60ed7f75416f5c4ad59c7cf997d7 (patch) | |
tree | f58a4760158296425852000fb80c5e1159f64254 /src/vpn | |
parent | 00ad20209a190e760dbaa3763608cb01899ae9b4 (diff) | |
download | gnunet-19ee99ab594b60ed7f75416f5c4ad59c7cf997d7.tar.gz gnunet-19ee99ab594b60ed7f75416f5c4ad59c7cf997d7.zip |
FIXMEs
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-daemon-vpn-helper.c | 8 | ||||
-rw-r--r-- | src/vpn/gnunet-helper-vpn-api.c | 15 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/vpn/gnunet-daemon-vpn-helper.c b/src/vpn/gnunet-daemon-vpn-helper.c index b5f83f9db..fdb5dddaa 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.c +++ b/src/vpn/gnunet-daemon-vpn-helper.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "gnunet-service-dns-p.h" | 40 | #include "gnunet-service-dns-p.h" |
41 | #include "gnunet-vpn-packet.h" | 41 | #include "gnunet-vpn-packet.h" |
42 | #include "gnunet-vpn-checksum.h" | 42 | #include "gnunet-vpn-checksum.h" |
43 | #include "gnunet-helper-vpn-api.h" | ||
43 | 44 | ||
44 | struct GNUNET_VPN_HELPER_Handle *helper_handle; | 45 | struct GNUNET_VPN_HELPER_Handle *helper_handle; |
45 | 46 | ||
@@ -185,7 +186,12 @@ helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) { | |||
185 | GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans); | 186 | GNUNET_CONTAINER_DLL_remove (answer_proc_head, answer_proc_tail, ans); |
186 | GNUNET_free(ans); | 187 | GNUNET_free(ans); |
187 | 188 | ||
188 | /* FIXME */ GNUNET_DISK_file_write(helper_handle->fh_to_helper, pkt, pkt_len); | 189 | if (GNUNET_DISK_file_write(helper_handle->fh_to_helper, pkt, pkt_len) < 0) |
190 | { | ||
191 | cleanup_helper(helper_handle); | ||
192 | GNUNET_SCHEDULER_add_now(start_helper_and_schedule, NULL); | ||
193 | return; | ||
194 | } | ||
189 | 195 | ||
190 | /* if more packets are available, reschedule */ | 196 | /* if more packets are available, reschedule */ |
191 | if (answer_proc_head != NULL) | 197 | if (answer_proc_head != NULL) |
diff --git a/src/vpn/gnunet-helper-vpn-api.c b/src/vpn/gnunet-helper-vpn-api.c index 486dfe042..5736df2b1 100644 --- a/src/vpn/gnunet-helper-vpn-api.c +++ b/src/vpn/gnunet-helper-vpn-api.c | |||
@@ -76,8 +76,19 @@ helper_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx) | |||
76 | return; | 76 | return; |
77 | } | 77 | } |
78 | 78 | ||
79 | /* FIXME */ GNUNET_SERVER_mst_receive (handle->mst, handle->client, buf, t, | 79 | if (GNUNET_SYSERR == |
80 | 0, 0); | 80 | GNUNET_SERVER_mst_receive (handle->mst, handle->client, buf, t, 0, 0)) |
81 | { | ||
82 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
83 | "SYSERR from mst\n"); | ||
84 | stop_helper (handle); | ||
85 | |||
86 | /* Restart the helper */ | ||
87 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | ||
88 | handle->restart_task, handle); | ||
89 | return; | ||
90 | |||
91 | } | ||
81 | 92 | ||
82 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, | 93 | GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, |
83 | handle->fh_from_helper, &helper_read, | 94 | handle->fh_from_helper, &helper_read, |