aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHani Benhabiles <kroosec@gmail.com>2014-11-21 15:24:52 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-12-05 11:04:35 +0100
commitf28c3099dac009fc37075cb4ae0faef9e30e9406 (patch)
tree9dfe00e65f738d40827274a1699a44f60ca255c9
parent32a106c70d61123a0558a80b8f45c62c4dd49027 (diff)
downloadlibssh-f28c3099dac009fc37075cb4ae0faef9e30e9406.tar.gz
libssh-f28c3099dac009fc37075cb4ae0faef9e30e9406.tar.xz
libssh-f28c3099dac009fc37075cb4ae0faef9e30e9406.zip
Set the correct error in ssh_options_set().
Signed-off-by: Hani Benhabiles <hani@linux.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe)
-rw-r--r--src/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/options.c b/src/options.c
index 0b26024a..3b702ef5 100644
--- a/src/options.c
+++ b/src/options.c
@@ -512,7 +512,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
}
session->opts.username = q;
} else if (v[0] == '\0') {
- ssh_set_error_oom(session);
+ ssh_set_error_invalid(session);
return -1;
} else { /* username provided */
session->opts.username = strdup(value);
@@ -531,7 +531,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
return -1;
}
} else if (v[0] == '\0') {
- ssh_set_error_oom(session);
+ ssh_set_error_invalid(session);
return -1;
} else {
session->opts.sshdir = ssh_path_expand_tilde(v);