From cf483d664df92440443526acc276bc823c34ff31 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 27 Oct 2022 16:19:22 -0400 Subject: [PATCH] Set PVAS_SERVER_PORT --- src/ioc/PVAServerRegister.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ioc/PVAServerRegister.cpp b/src/ioc/PVAServerRegister.cpp index 0537f005..fdebdfde 100644 --- a/src/ioc/PVAServerRegister.cpp +++ b/src/ioc/PVAServerRegister.cpp @@ -52,6 +52,12 @@ void startitup() { // from environment .push_env() .build())); + + unsigned short port = the_server->getServerPort(); + char pbuf[7]; + epicsSnprintf(pbuf, sizeof(pbuf)-1, "%u", port); + pbuf[sizeof(pbuf)-1] = '\0'; + epicsEnvSet("PVAS_SERVER_PORT", pbuf); } void startPVAServer(const char *names)