Bugzilla – Attachment 3154 Details for
Bug 2871
sftp client exits with zero exit status on error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sftp-client.c - transform return values to {-1, 0} consistently
0001-Unify-return-values-in-functions-from-sftp-client.patch (text/plain), 1.15 KB, created by
Petr Cerny [:hrosik]
on 2018-05-23 23:17:06 AEST
(
hide
)
Description:
sftp-client.c - transform return values to {-1, 0} consistently
Filename:
MIME Type:
Creator:
Petr Cerny [:hrosik]
Created:
2018-05-23 23:17:06 AEST
Size:
1.15 KB
patch
obsolete
>From 22f4b4a17dd3f1df368b58f361ad0dcb6c2e6147 Mon Sep 17 00:00:00 2001 >From: Josef Cejka <jcejka@suse.com> >Date: Tue, 15 May 2018 17:38:24 +0200 >Subject: [PATCH] Unify return values in functions from sftp-client. > >Affected functions used both 0/-1 and SSH2_FX_* constants as return >values. It caused that errors were sometimes not properly detected. >--- > sftp-client.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/sftp-client.c b/sftp-client.c >index 0b53a2e6..02d1130c 100644 >--- a/sftp-client.c >+++ b/sftp-client.c >@@ -669,7 +669,7 @@ do_lsreaddir(struct sftp_conn *conn, const char *path, int print_flag, > **dir = NULL; > } > >- return status; >+ return status == SSH2_FX_OK ? 0 : -1; > } > > int >@@ -1019,7 +1019,7 @@ do_fsync(struct sftp_conn *conn, u_char *handle, u_int handle_len) > if (status != SSH2_FX_OK) > error("Couldn't sync file: %s", fx2txt(status)); > >- return status; >+ return status == SSH2_FX_OK ? 0 : -1; > } > > #ifdef notyet >@@ -1451,7 +1451,7 @@ do_download(struct sftp_conn *conn, const char *remote_path, > sshbuf_free(msg); > free(handle); > >- return(status); >+ return status == SSH2_FX_OK ? 0 : -1; > } > > static int >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2871
: 3154