summaryrefslogtreecommitdiff
path: root/src/vyconf_client.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-04-16 14:51:36 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-05-12 11:26:41 -0500
commitc6a09cc9fce42323d86d2f4e161a894cdc970a24 (patch)
tree0d82f98183bbf16d6a4a6d5c5c4d32c29eb3f24f /src/vyconf_client.ml
parentc508c8c66c76488337745cf151d9570c42e38a3b (diff)
downloadvyconf-c6a09cc9fce42323d86d2f4e161a894cdc970a24.tar.gz
vyconf-c6a09cc9fce42323d86d2f4e161a894cdc970a24.zip
T7363: track process id in session data
In practice, this may be passed in the request as the ppid, as needed for CLI applications to coordinate with the ambient config session. For other uses, the client pid will suffice.
Diffstat (limited to 'src/vyconf_client.ml')
-rw-r--r--src/vyconf_client.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vyconf_client.ml b/src/vyconf_client.ml
index c4811c5..9971f8f 100644
--- a/src/vyconf_client.ml
+++ b/src/vyconf_client.ml
@@ -53,10 +53,10 @@ let prompt client =
let%lwt resp = do_request client req in
Lwt.return resp
-let setup_session ?(on_behalf_of=None) client client_app =
+let setup_session ?(on_behalf_of=None) client client_app pid =
if Option.is_some client.session then Lwt.return (Error "Client is already associated with a session") else
let id = on_behalf_of |> (function None -> None | Some x -> (Some (Int32.of_int x))) in
- let req = Setup_session {client_application=(Some client_app); on_behalf_of=id} in
+ let req = Setup_session {client_application=(Some client_app); on_behalf_of=id; client_pid=pid} in
let%lwt resp = do_request client req in
match resp.status with
| Success ->