mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
- Improve DNS failure message to include lookup host
--HG-- extra : convert_revision : c0555e457f4da6b618b87f2cf4bf5c4c4d0f9e28
This commit is contained in:
parent
d981ff2c8d
commit
d54f38caf2
5
dbutil.c
5
dbutil.c
@ -321,9 +321,10 @@ int connect_remote(const char* remotehost, const char* remoteport,
|
|||||||
if (err) {
|
if (err) {
|
||||||
if (errstring != NULL && *errstring == NULL) {
|
if (errstring != NULL && *errstring == NULL) {
|
||||||
int len;
|
int len;
|
||||||
len = 20 + strlen(gai_strerror(err));
|
len = 100 + strlen(gai_strerror(err));
|
||||||
*errstring = (char*)m_malloc(len);
|
*errstring = (char*)m_malloc(len);
|
||||||
snprintf(*errstring, len, "Error resolving: %s", gai_strerror(err));
|
snprintf(*errstring, len, "Error resolving '%s' port '%s'. %s",
|
||||||
|
remotehost, remoteport, gai_strerror(err));
|
||||||
}
|
}
|
||||||
TRACE(("Error resolving: %s", gai_strerror(err)))
|
TRACE(("Error resolving: %s", gai_strerror(err)))
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user