mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Rewrite strerror to ssh_strerror
Signed-off-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
4719c09e6a
commit
a2a037a821
@@ -315,6 +315,7 @@ static int ssh_pcap_context_connect(ssh_pcap_context ctx)
|
|||||||
socket_t fd;
|
socket_t fd;
|
||||||
socklen_t len;
|
socklen_t len;
|
||||||
int rc;
|
int rc;
|
||||||
|
char err_msg[SSH_ERRNO_MSG_MAX] = {0};
|
||||||
|
|
||||||
if (session == NULL) {
|
if (session == NULL) {
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
@@ -337,7 +338,7 @@ static int ssh_pcap_context_connect(ssh_pcap_context ctx)
|
|||||||
ssh_set_error(session,
|
ssh_set_error(session,
|
||||||
SSH_REQUEST_DENIED,
|
SSH_REQUEST_DENIED,
|
||||||
"Getting local IP address: %s",
|
"Getting local IP address: %s",
|
||||||
strerror(errno));
|
ssh_strerror(errno, err_msg, SSH_ERRNO_MSG_MAX));
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +348,7 @@ static int ssh_pcap_context_connect(ssh_pcap_context ctx)
|
|||||||
ssh_set_error(session,
|
ssh_set_error(session,
|
||||||
SSH_REQUEST_DENIED,
|
SSH_REQUEST_DENIED,
|
||||||
"Getting remote IP address: %s",
|
"Getting remote IP address: %s",
|
||||||
strerror(errno));
|
ssh_strerror(errno, err_msg, SSH_ERRNO_MSG_MAX));
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user