diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-10-06 15:49:47 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-10-06 15:49:47 +0200 |
commit | d1b772f1bc05d33f0abbab191872093f91689c40 (patch) | |
tree | eac82a60868f86d6a23c2a37bbfd108118af9620 | |
parent | 876f843f237f1eb7253dc6323b2c49faff8e0d49 (diff) | |
download | libssh-d1b772f1bc05d33f0abbab191872093f91689c40.tar.gz libssh-d1b772f1bc05d33f0abbab191872093f91689c40.tar.xz libssh-d1b772f1bc05d33f0abbab191872093f91689c40.zip |
Added more error messages to config parser.
-rw-r--r-- | libssh/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/config.c b/libssh/config.c index 6bd4e316..1c17b8cc 100644 --- a/libssh/config.c +++ b/libssh/config.c @@ -161,6 +161,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, x = s = strdup(line); if (s == NULL) { + ssh_set_error_oom(session); return -1; } @@ -241,6 +242,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, b = strdup(p); if (b == NULL) { SAFE_FREE(x); + ssh_set_error_oom(session); return -1; } i = 0; @@ -292,7 +294,7 @@ int ssh_config_parse_file(ssh_session session, const char *filename) { int parsing; if ((f = fopen(filename, "r")) == NULL) { - return -1; + return 0; } if (session->log_verbosity) { |