diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-19 12:03:26 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2014-05-19 12:03:26 +0000 |
commit | 7528bcf5a5af0d90c06aeab964e5c6471900ae06 (patch) | |
tree | 24d181f1ae50e2cca9a2dcd49e90278e0a4389d7 /src/nat/nat_test.c | |
parent | 26c076220f09adcbb79ba296985b78deeb53dd9a (diff) | |
download | gnunet-7528bcf5a5af0d90c06aeab964e5c6471900ae06.tar.gz gnunet-7528bcf5a5af0d90c06aeab964e5c6471900ae06.zip |
- updated NAT callback function defintion to no longer carry around strings,
- NAT lib now uses error-code enums to signal success and errors
- reworked related code to return errorcodes
- added and updated a missing doxygen documention
- todo next: testcases
Diffstat (limited to 'src/nat/nat_test.c')
-rw-r--r-- | src/nat/nat_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c index 866c15e5e..7d9d1a49c 100644 --- a/src/nat/nat_test.c +++ b/src/nat/nat_test.c | |||
@@ -187,7 +187,7 @@ reversal_cb (void *cls, | |||
187 | return; /* wrong port */ | 187 | return; /* wrong port */ |
188 | } | 188 | } |
189 | /* report success */ | 189 | /* report success */ |
190 | h->report (h->report_cls, GNUNET_OK, NULL); | 190 | h->report (h->report_cls, GNUNET_NAT_ERROR_SUCCESS); |
191 | } | 191 | } |
192 | 192 | ||
193 | 193 | ||
@@ -215,7 +215,7 @@ do_udp_read (void *cls, | |||
215 | GNUNET_NETWORK_socket_recv (tst->lsock, &data, sizeof (data)))) | 215 | GNUNET_NETWORK_socket_recv (tst->lsock, &data, sizeof (data)))) |
216 | { | 216 | { |
217 | if (data == tst->data) | 217 | if (data == tst->data) |
218 | tst->report (tst->report_cls, GNUNET_OK, NULL); | 218 | tst->report (tst->report_cls, GNUNET_NAT_ERROR_SUCCESS); |
219 | else | 219 | else |
220 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 220 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
221 | "Received data mismatches expected value\n"); | 221 | "Received data mismatches expected value\n"); |
@@ -250,7 +250,7 @@ do_read (void *cls, | |||
250 | GNUNET_NETWORK_socket_recv (na->sock, &data, sizeof (data)))) | 250 | GNUNET_NETWORK_socket_recv (na->sock, &data, sizeof (data)))) |
251 | { | 251 | { |
252 | if (data == tst->data) | 252 | if (data == tst->data) |
253 | tst->report (tst->report_cls, GNUNET_OK, NULL); | 253 | tst->report (tst->report_cls, GNUNET_NAT_ERROR_SUCCESS); |
254 | else | 254 | else |
255 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 255 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
256 | "Received data does not match expected value\n"); | 256 | "Received data does not match expected value\n"); |