diff options
author | Ruben Garcia Azuara <rubenga@tid.es> | 2010-04-06 19:39:41 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-04-07 11:29:47 +0200 |
commit | 14eb593af3c41ea439f01d34aaae497d8420f316 (patch) | |
tree | 67d295bd9d704d7e66a95fad447011f9b67431ab /libssh/config.c | |
parent | b2b7bc3b772e013a1c258dfc8d326d2f15e569a3 (diff) | |
download | libssh-14eb593af3c41ea439f01d34aaae497d8420f316.tar.gz libssh-14eb593af3c41ea439f01d34aaae497d8420f316.tar.xz libssh-14eb593af3c41ea439f01d34aaae497d8420f316.zip |
Fixed solaris compilation warning and ignore case at host parameter.
- Suppress compilation warning in solaris caused by a comma at the end of
the last value.
- Ignore case at host parameter in config file
Signed-off-by: Ruben Garcia Azuara <rubenga@tid.es>
Signed-off-by: Andreas Schneider <mail@cynapses.org>
Diffstat (limited to 'libssh/config.c')
-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 e3a00ca6..beb21fc5 100644 --- a/libssh/config.c +++ b/libssh/config.c @@ -183,12 +183,14 @@ static int ssh_config_parse_line(ssh_session session, const char *line, switch (opcode) { case SOC_HOST: *parsing = 0; + char* lowerhost = (session->host) ? ssh_lowercase(session->host) : NULL; for (p = ssh_config_get_str(&s, NULL); p && *p; p = ssh_config_get_str(&s, NULL)) { - if (match_hostname(session->host, p, strlen(p))) { + if (match_hostname(lowerhost, p, strlen(p))) { *parsing = 1; } } + SAFE_FREE(lowerhost); break; case SOC_HOSTNAME: p = ssh_config_get_str(&s, NULL); |