1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

session: Use a struct for all options.

This commit is contained in:
Andreas Schneider
2012-02-05 11:50:49 +01:00
parent 840f75f10c
commit ee774479de
16 changed files with 235 additions and 226 deletions

View File

@@ -195,7 +195,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
switch (opcode) {
case SOC_HOST:
*parsing = 0;
lowerhost = (session->host) ? ssh_lowercase(session->host) : NULL;
lowerhost = (session->opts.host) ? ssh_lowercase(session->opts.host) : NULL;
for (p = ssh_config_get_str(&s, NULL); p && *p;
p = ssh_config_get_str(&s, NULL)) {
if (match_hostname(lowerhost, p, strlen(p))) {
@@ -211,7 +211,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
}
break;
case SOC_PORT:
if (session->port == 22) {
if (session->opts.port == 22) {
p = ssh_config_get_str(&s, NULL);
if (p && *parsing) {
ssh_options_set(session, SSH_OPTIONS_PORT_STR, p);
@@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
}
break;
case SOC_USERNAME:
if (session->username == NULL) {
if (session->opts.username == NULL) {
p = ssh_config_get_str(&s, NULL);
if (p && *parsing) {
ssh_options_set(session, SSH_OPTIONS_USER, p);