diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-11 08:42:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-11 08:42:40 +0000 |
commit | 48fa0ba8abea2464b2df67247ae1bd50d0f1f934 (patch) | |
tree | dae4c813f027986748b1b3d2a3f84f8d2a7eb00c /src/transport/transport_api_address_to_string.c | |
parent | 09c50fa070ad81f2d213975782b2948a7cb82428 (diff) | |
download | gnunet-48fa0ba8abea2464b2df67247ae1bd50d0f1f934.tar.gz gnunet-48fa0ba8abea2464b2df67247ae1bd50d0f1f934.zip |
-send proper termination on error
Diffstat (limited to 'src/transport/transport_api_address_to_string.c')
-rw-r--r-- | src/transport/transport_api_address_to_string.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index afd0c7deb..e36904212 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c | |||
@@ -76,8 +76,7 @@ address_response_processor (void *cls, | |||
76 | alucb->cb (alucb->cb_cls, | 76 | alucb->cb (alucb->cb_cls, |
77 | NULL, | 77 | NULL, |
78 | GNUNET_SYSERR); | 78 | GNUNET_SYSERR); |
79 | GNUNET_CLIENT_disconnect (alucb->client); | 79 | GNUNET_TRANSPORT_address_to_string_cancel (alucb); |
80 | GNUNET_free (alucb); | ||
81 | return; | 80 | return; |
82 | } | 81 | } |
83 | GNUNET_break (ntohs (msg->type) == | 82 | GNUNET_break (ntohs (msg->type) == |
@@ -90,8 +89,7 @@ address_response_processor (void *cls, | |||
90 | alucb->cb (alucb->cb_cls, | 89 | alucb->cb (alucb->cb_cls, |
91 | NULL, | 90 | NULL, |
92 | GNUNET_SYSERR); | 91 | GNUNET_SYSERR); |
93 | GNUNET_CLIENT_disconnect (alucb->client); | 92 | GNUNET_TRANSPORT_address_to_string_cancel (alucb); |
94 | GNUNET_free (alucb); | ||
95 | return; | 93 | return; |
96 | } | 94 | } |
97 | atsm = (const struct AddressToStringResultMessage *) msg; | 95 | atsm = (const struct AddressToStringResultMessage *) msg; |
@@ -126,8 +124,7 @@ address_response_processor (void *cls, | |||
126 | alucb->cb (alucb->cb_cls, | 124 | alucb->cb (alucb->cb_cls, |
127 | NULL, | 125 | NULL, |
128 | GNUNET_OK); | 126 | GNUNET_OK); |
129 | GNUNET_CLIENT_disconnect (alucb->client); | 127 | GNUNET_TRANSPORT_address_to_string_cancel (alucb); |
130 | GNUNET_free (alucb); | ||
131 | return; | 128 | return; |
132 | } | 129 | } |
133 | address = (const char *) &atsm[1]; | 130 | address = (const char *) &atsm[1]; |
@@ -139,8 +136,7 @@ address_response_processor (void *cls, | |||
139 | alucb->cb (alucb->cb_cls, | 136 | alucb->cb (alucb->cb_cls, |
140 | NULL, | 137 | NULL, |
141 | GNUNET_SYSERR); | 138 | GNUNET_SYSERR); |
142 | GNUNET_CLIENT_disconnect (alucb->client); | 139 | GNUNET_TRANSPORT_address_to_string_cancel (alucb); |
143 | GNUNET_free (alucb); | ||
144 | return; | 140 | return; |
145 | } | 141 | } |
146 | /* expect more replies */ | 142 | /* expect more replies */ |