1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +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

@@ -729,7 +729,7 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
switch (*p) {
case 'd':
x = strdup(session->sshdir);
x = strdup(session->opts.sshdir);
break;
case 'u':
x = ssh_get_local_username();
@@ -740,16 +740,16 @@ char *ssh_path_expand_escape(ssh_session session, const char *s) {
}
break;
case 'h':
x = strdup(session->host);
x = strdup(session->opts.host);
break;
case 'r':
x = strdup(session->username);
x = strdup(session->opts.username);
break;
case 'p':
if (session->port < 65536) {
if (session->opts.port < 65536) {
char tmp[6];
snprintf(tmp, sizeof(tmp), "%u", session->port);
snprintf(tmp, sizeof(tmp), "%u", session->opts.port);
x = strdup(tmp);
}
break;