Mercurial > dropbear
comparison netio.c @ 1066:cce03ea8e6eb
strdup strerror
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 11 Mar 2015 23:10:27 +0800 |
parents | 23103e1e9548 |
children | ce21d0bfaf98 |
comparison
equal
deleted
inserted
replaced
1065:23103e1e9548 | 1066:cce03ea8e6eb |
---|---|
239 TRACE(("connect to %s port %s failed.", c->remotehost, c->remoteport)) | 239 TRACE(("connect to %s port %s failed.", c->remotehost, c->remoteport)) |
240 m_close(c->sock); | 240 m_close(c->sock); |
241 c->sock = -1; | 241 c->sock = -1; |
242 | 242 |
243 m_free(c->errstring); | 243 m_free(c->errstring); |
244 c->errstring = strerror(val); | 244 c->errstring = m_strdup(strerror(val)); |
245 } else { | 245 } else { |
246 /* New connection has been established */ | 246 /* New connection has been established */ |
247 c->cb(DROPBEAR_SUCCESS, c->sock, c->cb_data, NULL); | 247 c->cb(DROPBEAR_SUCCESS, c->sock, c->cb_data, NULL); |
248 remove_connect(c, iter); | 248 remove_connect(c, iter); |
249 TRACE(("leave handle_connect_fds - success")) | 249 TRACE(("leave handle_connect_fds - success")) |