Skip to content

Commit

Permalink
session-func: Handle "process-config?" only with libssh 0.9.0+
Browse files Browse the repository at this point in the history
* libguile-ssh/session-func.c (session_options): Add
SSH_OPTIONS_PROCESS_CONFIG only when libssh version 0.9.0 is used.
(set_option): Handle SSH_OPTIONS_PROCESS_CONFIG
option only if libssh version 0.9.0 or later is used.
  • Loading branch information
artyom-poptsov committed Nov 5, 2024
1 parent 1372683 commit 10051e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libguile-ssh/session-func.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ static gssh_symbol_t session_options[] = {
{ "stricthostkeycheck", SSH_OPTIONS_STRICTHOSTKEYCHECK },
{ "compression", SSH_OPTIONS_COMPRESSION },
{ "compression-level", SSH_OPTIONS_COMPRESSION_LEVEL },
#if HAVE_LIBSSH_0_9
/* This option was added only in 0.9.0 (commit
79f0c38fbd767f578d7b87fae15fb64faad32aab) */
{ "process-config?", SSH_OPTIONS_PROCESS_CONFIG },
#endif

#if HAVE_LIBSSH_0_8_1
{ "nodelay", SSH_OPTIONS_NODELAY },
Expand Down Expand Up @@ -385,7 +389,13 @@ set_option (SCM scm_session, gssh_session_t* sd, int type, SCM value)
case SSH_OPTIONS_SSH1:
case SSH_OPTIONS_SSH2:
case SSH_OPTIONS_STRICTHOSTKEYCHECK:

#if HAVE_LIBSSH_0_9
/* This option was added only in 0.9.0 (commit
79f0c38fbd767f578d7b87fae15fb64faad32aab) */
case SSH_OPTIONS_PROCESS_CONFIG:
#endif

#if HAVE_LIBSSH_0_8_1
case SSH_OPTIONS_NODELAY:
#endif
Expand Down

0 comments on commit 10051e8

Please sign in to comment.