--- a/src/server/config/serverconfig.c Thu Jan 20 16:04:58 2022 +0100 +++ b/src/server/config/serverconfig.c Sat Jan 22 11:06:11 2022 +0100 @@ -193,7 +193,7 @@ //printf("%s [%.*s]\n", token_type_str(token.type), (int)token.content.length, token.content.ptr); switch(token.type) { - CFG_NO_TOKEN: break; + case CFG_NO_TOKEN: break; case CFG_TOKEN_COMMENT: { if(current->type == CONFIG_NODE_SPACE) { current->type = CONFIG_NODE_COMMENT; @@ -321,3 +321,20 @@ } return scstrn(NULL, 0); } + +sstr_t serverconfig_arg_name_value(UcxAllocator *a, scstr_t str, scstr_t *name) { + int valstart = 0; + for(int i=0;i<str.length;i++) { + if(str.ptr[i] == '=') { + if(name) { + name->ptr = str.ptr; + name->length = i; + } + valstart = i + 1; + break; + } + } + + sstr_t ret; + return ret; +}