Skip to content

Commit cf483d6

Browse files
mdavidsaveranjohnson
authored andcommitted
Set PVAS_SERVER_PORT
1 parent 55ab0fd commit cf483d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ioc/PVAServerRegister.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ void startitup() {
5252
// from environment
5353
.push_env()
5454
.build()));
55+
56+
unsigned short port = the_server->getServerPort();
57+
char pbuf[7];
58+
epicsSnprintf(pbuf, sizeof(pbuf)-1, "%u", port);
59+
pbuf[sizeof(pbuf)-1] = '\0';
60+
epicsEnvSet("PVAS_SERVER_PORT", pbuf);
5561
}
5662

5763
void startPVAServer(const char *names)

0 commit comments

Comments
 (0)