src/server/daemon/config.c

changeset 139
29ac9aed4889
parent 135
471e28cca288
child 145
1c93281ca4bf
equal deleted inserted replaced
138:06619bbd14ef 139:29ac9aed4889
343 } 343 }
344 344
345 LogConfig logcfg; 345 LogConfig logcfg;
346 logcfg.file = sstrdup(file).ptr; 346 logcfg.file = sstrdup(file).ptr;
347 logcfg.level = sstrdup(lvl).ptr; 347 logcfg.level = sstrdup(lvl).ptr;
348 logcfg.log_stdout = 0;
349 logcfg.log_stderr = 0;
348 /* TODO: stdout, stderr config */ 350 /* TODO: stdout, stderr config */
349 351
350 int ret = init_log_file(&logcfg); 352 int ret = init_log_file(&logcfg);
351 353
352 free(logcfg.file); 354 free(logcfg.file);
809 param = param->next; 811 param = param->next;
810 } 812 }
811 813
812 // get function 814 // get function
813 char *func_name = pblock_findval("fn", d->param); 815 char *func_name = pblock_findval("fn", d->param);
816 if(!func_name) {
817 log_ereport(LOG_MISCONFIG, "%s: Missing fn parameter", file);
818 return NULL;
819 }
814 d->func = get_function(func_name); 820 d->func = get_function(func_name);
821 if(!d->func) {
822 log_ereport(LOG_MISCONFIG, "func %s not found", func_name);
823 return NULL;
824 }
815 825
816 dirs = dirs->next; 826 dirs = dirs->next;
817 827
818 // add function to dtable 828 // add function to dtable
819 object_add_directive(obj, d, cfgdir->type_num); 829 object_add_directive(obj, d, cfgdir->type_num);

mercurial