diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-27 11:36:51 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-05-27 11:36:51 +0000 |
commit | 2cecee44de434344273c797e6db4878a81e2f6fa (patch) | |
tree | 3d5ae7a4cb40a04856f8dd9d7d4b73820c3dcc1d /src/ats-tool/gnunet-ats.c | |
parent | 843b0b72afd76a8a0444d302ff4ec8cc51eb50fa (diff) | |
download | gnunet-2cecee44de434344273c797e6db4878a81e2f6fa.tar.gz gnunet-2cecee44de434344273c797e6db4878a81e2f6fa.zip |
change order for error check
Diffstat (limited to 'src/ats-tool/gnunet-ats.c')
-rw-r--r-- | src/ats-tool/gnunet-ats.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index 3f5865e99..55132f8ef 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c | |||
@@ -185,6 +185,15 @@ transport_addr_to_str_cb(void *cls, const char *address, int res) | |||
185 | uint32_t ats_value; | 185 | uint32_t ats_value; |
186 | uint32_t network; | 186 | uint32_t network; |
187 | 187 | ||
188 | if (res == GNUNET_SYSERR) | ||
189 | { | ||
190 | fprintf (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n", | ||
191 | GNUNET_i2s (&pr->address->peer), | ||
192 | pr->address->transport_name, | ||
193 | pr->address->address_length ); | ||
194 | return; | ||
195 | } | ||
196 | |||
188 | if (NULL == address) | 197 | if (NULL == address) |
189 | { | 198 | { |
190 | /* We're done */ | 199 | /* We're done */ |
@@ -204,15 +213,6 @@ transport_addr_to_str_cb(void *cls, const char *address, int res) | |||
204 | return; | 213 | return; |
205 | } | 214 | } |
206 | 215 | ||
207 | if (res == GNUNET_SYSERR) | ||
208 | { | ||
209 | fprintf (stderr, "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n", | ||
210 | GNUNET_i2s (&pr->address->peer), | ||
211 | pr->address->transport_name, | ||
212 | pr->address->address_length ); | ||
213 | return; | ||
214 | } | ||
215 | |||
216 | ats_str = GNUNET_strdup(""); | 216 | ats_str = GNUNET_strdup(""); |
217 | network = GNUNET_ATS_NET_UNSPECIFIED; | 217 | network = GNUNET_ATS_NET_UNSPECIFIED; |
218 | for (c = 0; c < pr->ats_count; c++) | 218 | for (c = 0; c < pr->ats_count; c++) |