Mercurial > dropbear
comparison dbutil.c @ 242:3311f4aa52cb
merge of da30137eaac417f50a323f9ddd29999ec21261e0
and fb45ddf51e20f0ff007eb8abc737de3c024f45cc
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 05 Sep 2005 15:16:52 +0000 |
parents | c5d3ef11155f e5ad9fa8b1fa |
children | b02e8eef3c3a |
comparison
equal
deleted
inserted
replaced
241:c5d3ef11155f | 242:3311f4aa52cb |
---|---|
188 int len; | 188 int len; |
189 len = 20 + strlen(gai_strerror(err)); | 189 len = 20 + strlen(gai_strerror(err)); |
190 *errstring = (char*)m_malloc(len); | 190 *errstring = (char*)m_malloc(len); |
191 snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); | 191 snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err)); |
192 } | 192 } |
193 if (res0) { | |
194 freeaddrinfo(res0); | |
195 res0 = NULL; | |
196 } | |
193 TRACE(("leave dropbear_listen: failed resolving")) | 197 TRACE(("leave dropbear_listen: failed resolving")) |
194 return -1; | 198 return -1; |
195 } | 199 } |
196 | 200 |
197 | 201 |
237 } | 241 } |
238 | 242 |
239 *maxfd = MAX(*maxfd, sock); | 243 *maxfd = MAX(*maxfd, sock); |
240 | 244 |
241 nsock++; | 245 nsock++; |
246 } | |
247 | |
248 if (res0) { | |
249 freeaddrinfo(res0); | |
250 res0 = NULL; | |
242 } | 251 } |
243 | 252 |
244 if (nsock == 0) { | 253 if (nsock == 0) { |
245 if (errstring != NULL && *errstring == NULL) { | 254 if (errstring != NULL && *errstring == NULL) { |
246 int len; | 255 int len; |