diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-01-07 05:14:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-01-07 05:14:12 +0000 |
commit | 9e0744da3a82cc7b68a9043272044584be98db44 (patch) | |
tree | 0d66dcff21faddda56c57f6768f7fee49649366a /src/nat/nat_auto.c | |
parent | 1ab001d527da02fbf9a7212497c162a979aa8f6b (diff) | |
download | gnunet-9e0744da3a82cc7b68a9043272044584be98db44.tar.gz gnunet-9e0744da3a82cc7b68a9043272044584be98db44.zip |
-modify NAT API to return error messages about problems detected
Diffstat (limited to 'src/nat/nat_auto.c')
-rw-r--r-- | src/nat/nat_auto.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c index 9e7ff23f2..070099b23 100644 --- a/src/nat/nat_auto.c +++ b/src/nat/nat_auto.c | |||
@@ -185,9 +185,12 @@ fail_timeout (void *cls, | |||
185 | * | 185 | * |
186 | * @param cls the auto handle | 186 | * @param cls the auto handle |
187 | * @param success currently always #GNUNET_OK | 187 | * @param success currently always #GNUNET_OK |
188 | * @param emsg NULL on success, otherwise an error message | ||
188 | */ | 189 | */ |
189 | static void | 190 | static void |
190 | result_callback (void *cls, int success) | 191 | result_callback (void *cls, |
192 | int success, | ||
193 | const char *emsg) | ||
191 | { | 194 | { |
192 | struct GNUNET_NAT_AutoHandle *ah = cls; | 195 | struct GNUNET_NAT_AutoHandle *ah = cls; |
193 | 196 | ||
@@ -250,10 +253,12 @@ test_online (struct GNUNET_NAT_AutoHandle *ah) | |||
250 | * | 253 | * |
251 | * @param cls closure with our setup context | 254 | * @param cls closure with our setup context |
252 | * @param addr the address, NULL on errors | 255 | * @param addr the address, NULL on errors |
256 | * @param emsg NULL on success, otherwise an error message | ||
253 | */ | 257 | */ |
254 | static void | 258 | static void |
255 | set_external_ipv4 (void *cls, | 259 | set_external_ipv4 (void *cls, |
256 | const struct in_addr *addr) | 260 | const struct in_addr *addr, |
261 | const char *emsg) | ||
257 | { | 262 | { |
258 | struct GNUNET_NAT_AutoHandle *ah = cls; | 263 | struct GNUNET_NAT_AutoHandle *ah = cls; |
259 | char buf[INET_ADDRSTRLEN]; | 264 | char buf[INET_ADDRSTRLEN]; |
@@ -519,7 +524,8 @@ next_phase (struct GNUNET_NAT_AutoHandle *ah) | |||
519 | diff = GNUNET_CONFIGURATION_get_diff (ah->initial_cfg, | 524 | diff = GNUNET_CONFIGURATION_get_diff (ah->initial_cfg, |
520 | ah->cfg); | 525 | ah->cfg); |
521 | ah->fin_cb (ah->fin_cb_cls, | 526 | ah->fin_cb (ah->fin_cb_cls, |
522 | diff); | 527 | diff, |
528 | NULL); | ||
523 | GNUNET_CONFIGURATION_destroy (diff); | 529 | GNUNET_CONFIGURATION_destroy (diff); |
524 | GNUNET_NAT_autoconfig_cancel (ah); | 530 | GNUNET_NAT_autoconfig_cancel (ah); |
525 | return; | 531 | return; |