--- a/src/server/daemon/vserver.h Sat Nov 22 16:44:42 2025 +0100 +++ b/src/server/daemon/vserver.h Sun Nov 23 12:44:59 2025 +0100 @@ -35,27 +35,21 @@ #include "../public/nsapi.h" #include "../daemon/acldata.h" +#include "location.h" + #include "log.h" #ifdef __cplusplus extern "C" { #endif -typedef struct VSLocation VSLocation; - -struct VSLocation { - VSLocation *child_begin; - VSLocation *child_end; - - VSLocation *next; -}; struct VirtualServer { pool_handle_t *pool; cxmutstr name; cxmutstr host; - CxMap hosts; + CxMap *hosts; // TODO: list of listeners, check listener of vs cxmutstr objectfile; @@ -66,17 +60,19 @@ ACLData *acls; AccessLog *log; - VSLocation *locations_begin; - VSLocation *locations_end; + WSLocation *locations_begin; + WSLocation *locations_end; - uint32_t ref; // reference counter + uint32_t ref; // reference counter }; VirtualServer* vs_new(pool_handle_t *pool); int vs_add_host(VirtualServer *vs, cxstring host); +int vs_add_location(VirtualServer *vs, WSLocation *location); + #ifdef __cplusplus }