remove unused stuff config

Sun, 23 Aug 2020 22:02:01 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 23 Aug 2020 22:02:01 +0200
branch
config
changeset 253
ddfead6ea863
parent 210
21274e5950af
child 254
4784c14aa639

remove unused stuff

src/server/config/serverconf.c file | annotate | diff | comparison | revisions
src/server/config/serverconf.h file | annotate | diff | comparison | revisions
--- a/src/server/config/serverconf.c	Tue Aug 13 22:14:32 2019 +0200
+++ b/src/server/config/serverconf.c	Sun Aug 23 22:02:01 2020 +0200
@@ -116,50 +116,3 @@
 }
 
 
-UcxList* srvcfg_get_listeners(ServerConfig *cfg, UcxAllocator *mp, int *error) {
-    mp = mp ? mp : cfg->parser.mp;
-    
-    UcxList *list = ucx_map_sstr_get(cfg->objects, sstrn("Listener", 8));
-    UcxList *lslist = NULL;
-    UCX_FOREACH(elm, list) {
-        ServerConfigObject *ls = elm->data;
-        sstr_t name = cfg_directivelist_get_str(ls->directives, sstr("Name"));
-        sstr_t port = cfg_directivelist_get_str(ls->directives, sstr("Port"));
-        sstr_t vs = cfg_directivelist_get_str(
-                ls->directives,
-                sstr("DefaultVS"));
-        sstr_t threadpool = cfg_directivelist_get_str(
-                ls->directives,
-                sstr("Threadpool"));
-        
-        CfgListener *listener = OBJ_NEW_N(mp, CfgListener);
-        // threadpool is optional, all other configs must be set
-        if(!name.ptr || !port.ptr || !vs.ptr) {
-            // TODO: log error
-            *error = 1;
-            listener->cfg_correct = 0;
-        } else {
-            listener->cfg_correct = 1;
-        }
-        
-        if(name.ptr) {
-            listener->name = sstrdup_a(mp, name);
-        }
-        if(port.ptr) {
-            // don't expect that port is null terminated, sstrdup it to be sure
-            sstr_t portdp = sstrdup(port);
-            listener->port = atoi(portdp.ptr);
-            free(portdp.ptr);
-        }
-        if(vs.ptr) {
-            listener->vs = sstrdup_a(mp, vs);
-        }
-        if(threadpool.ptr) {
-            listener->threadpool = sstrdup_a(mp, threadpool);
-        }
-        
-        lslist = ucx_list_append_a(mp, lslist, listener);
-    }
-    
-    return lslist;
-}
--- a/src/server/config/serverconf.h	Tue Aug 13 22:14:32 2019 +0200
+++ b/src/server/config/serverconf.h	Sun Aug 23 22:02:01 2020 +0200
@@ -51,47 +51,6 @@
     ServerConfigObject *obj;
 } ServerConfig;
 
-// server.conf objects
-
-typedef struct _cfg_listener {
-    ServerConfigObject   *cfgobj;
-    sstr_t               name;
-    sstr_t               vs;
-    sstr_t               threadpool;
-    sstr_t               address;
-    int                  port;
-    int                  nacceptors;
-    int                  cfg_correct;
-} CfgListener;
-
-typedef struct _cfg_keyfile_authdb {
-    sstr_t file;
-} CfgKeyfileAuthDB;
-
-typedef struct _cfg_ldap_authdb {
-    sstr_t host;
-    int    port;
-    sstr_t basedn;
-    sstr_t binddn;
-    sstr_t bindpw;
-} CfgLDAPAuthDB;
-
-union authdb {
-    CfgKeyfileAuthDB keyfile;
-    CfgLDAPAuthDB    ldap;
-};
-
-enum authdb_type {
-    AUTHDB_TYPE_KEYFILE,
-    AUTHDB_TYPE_LDAP
-};
-
-typedef struct _cfg_authdb {
-    sstr_t           name;
-    enum authdb_type type;
-    union authdb     cfg;
-    int              cfg_correct;
-} CfgAuthDB;
 
 
 /*
@@ -110,7 +69,7 @@
 int serverconf_parse(void *p, ConfigLine *begin, ConfigLine *end, sstr_t line);
 
 
-UcxList* srvcfg_get_listeners(ServerConfig *cfg, UcxAllocator *mp, int *error);
+
 
 
 #ifdef	__cplusplus

mercurial