diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -27,10 +27,11 @@ */ -#include #include "execio.h" #include "options.h" #include +#include +#include #define MAX_BLENDJOBS 100 // maximum number of stored jobs in memory, per job type (lux/blend). Eventually we can dump this data to disk, or atleast the remainder not in memory... @@ -112,20 +113,24 @@ int main(int argc, char *argv[]) // Begin non-working framework? int distrend_do_config(int argc, char *argv[], struct distrend_config *config) { - cfg_opt_t myopts = - { - CFG_SEC("listen", /* this must be imported into struct listens (which must still be declared) */ + cfg_opt_t myopts_listen[] = { CFG_SIMPLE_STR("type", NULL), - CFG_SIMPLE_STR("path", NULL), - CFG_SIMPLE_INT("port", NULL) - }, + CFG_SIMPLE_STR("path", NULL), + CFG_SIMPLE_INT("port", NULL), + CFG_END() + }; + cfg_opt_t myopts[] = + { + CFG_SEC("listen", /* this must be imported into struct listens (which must still be declared) */ + myopts_listen + , CFGF_MULTI), - CFG_END + CFG_END() }; config = malloc(sizeof(struct distrend_config)); - options_init(argc, argv, &config->mycfg, &myopts, "server", &config->options); + options_init(argc, argv, &config->mycfg, myopts, "server", &config->options); return 0; } @@ -143,7 +148,7 @@ int main(int argc, char *argv[]) int cont = 1; struct distrend_listenset *listenset; struct distrend_config *config; - distrend_do_config(argc, argv, &config); + distrend_do_config(argc, argv, config); distrend_listen(&listenset, config); /* This is called the ``main loop'' */