From 68747ef0a8d3a136d51c1b3c8d0f2d16913f55a2 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 29 Nov 2024 16:46:40 -0500 Subject: [PATCH] cwWebSockSvr.cpp : Moved protocalA[] defn. in websockSrvTest() to use the cfg. provided values. --- cwWebSockSvr.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cwWebSockSvr.cpp b/cwWebSockSvr.cpp index f23dcba..8ede014 100644 --- a/cwWebSockSvr.cpp +++ b/cwWebSockSvr.cpp @@ -191,13 +191,6 @@ cw::rc_t cw::websockSrvTest( const object_t* cfg ) kWebsockSrvProtocolId = 2 }; - websock::protocol_t protocolA[] = - { - { "http", kHttpProtocolId, 0, 0}, - { "websocksrv_test_protocol",kWebsockSrvProtocolId,rcvBufByteN,xmtBufByteN} - }; - - if((rc = cfg->getv("physRootDir",physRootDirArg, "dfltHtmlPageFn",dfltHtmlPageFn, "port",port, @@ -210,6 +203,13 @@ cw::rc_t cw::websockSrvTest( const object_t* cfg ) { return cwLogError(rc,"Args parse failed."); } + + websock::protocol_t protocolA[] = + { + { "http", kHttpProtocolId, 0, 0}, + { "websocksrv_test_protocol",kWebsockSrvProtocolId,rcvBufByteN,xmtBufByteN} + }; + char* physRootDir = cw::filesys::expandPath(physRootDirArg); unsigned protocolN = sizeof(protocolA)/sizeof(protocolA[0]);