Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
4913-ssh-Function-to-replace-options-in-a-runni...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 4913-ssh-Function-to-replace-options-in-a-running-daemon.patch of Package erlang
From 508f1f9b21220a6cde46f82f560250d47a2ceca7 Mon Sep 17 00:00:00 2001 From: Hans Nilsson <hans@erlang.org> Date: Tue, 2 Aug 2022 15:05:57 +0200 Subject: [PATCH 3/5] ssh: Function to replace options in a running daemon --- lib/ssh/src/ssh.erl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl index 320a1992bc..0a7fce9fce 100644 --- a/lib/ssh/src/ssh.erl +++ b/lib/ssh/src/ssh.erl @@ -35,6 +35,7 @@ channel_info/3, daemon/1, daemon/2, daemon/3, daemon_info/1, daemon_info/2, + daemon_replace_options/2, set_sock_opts/2, get_sock_opts/2, default_algorithms/0, chk_algos_opts/1, @@ -442,6 +443,17 @@ daemon(Host0, Port0, UserOptions0) when 0 =< Port0, Port0 =< 65535, daemon(_, _, _) -> {error, badarg}. +%%-------------------------------------------------------------------- +-spec daemon_replace_options(DaemonRef, NewUserOptions) -> {ok,daemon_ref()} + | {error,term()} when + DaemonRef :: daemon_ref(), + NewUserOptions :: daemon_options(). + +daemon_replace_options(DaemonRef, NewUserOptions) -> + {ok,Os0} = ssh_system_sup:get_acceptor_options(DaemonRef), + Os1 = ssh_options:merge_options(server, NewUserOptions, Os0), + ssh_system_sup:replace_acceptor_options(DaemonRef, Os1). + %%-------------------------------------------------------------------- -type daemon_info_tuple() :: {port, inet:port_number()} -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor