SCP: on failure, show the numerical error reason

By calling libssh2_session_last_errno()
This commit is contained in:
Daniel Stenberg 2010-11-10 17:26:38 +01:00
parent 82fa5d2167
commit 160453cee4

View File

@ -137,7 +137,8 @@ int main(int argc, char *argv[])
channel = libssh2_scp_recv(session, scppath, &fileinfo);
if (!channel) {
fprintf(stderr, "Unable to open a session\n");
fprintf(stderr, "Unable to open a session: %d\n",
libssh2_session_last_errno(session));
goto shutdown;
}