Gavrie Philipson sumitted a patch to get the actual text of the error
on scp upload.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: scp_write_nonblock.c,v 1.2 2007/06/08 13:33:08 jehousley Exp $
|
||||
* $Id: scp_write_nonblock.c,v 1.3 2007/07/05 11:08:17 jehousley Exp $
|
||||
*
|
||||
* Sample showing how to do a simple SCP transfer.
|
||||
*/
|
||||
@@ -165,7 +165,10 @@ int main(int argc, char *argv[])
|
||||
channel = libssh2_scp_send(session, scppath, 0x1FF & fileinfo.st_mode, (unsigned long)fileinfo.st_size);
|
||||
|
||||
if ((!channel) && (libssh2_session_last_errno(session) != LIBSSH2_ERROR_EAGAIN)) {
|
||||
fprintf(stderr, "Unable to open a session\n");
|
||||
char *err_msg;
|
||||
|
||||
libssh2_session_last_error(session, &err_msg, NULL, 0);
|
||||
fprintf(stderr, "%s\n", err_msg);
|
||||
goto shutdown;
|
||||
}
|
||||
} while (!channel);
|
||||
|
||||
Reference in New Issue
Block a user