--- a/src/server/config/conf.c Mon Oct 14 13:36:28 2013 +0200 +++ b/src/server/config/conf.c Sun Nov 03 16:41:42 2013 +0100 @@ -379,21 +379,25 @@ */ int cfg_get_directive_type_num(sstr_t type) { /* get nsapi function type */ + + // TODO: replace hard coded numbers int dt = -1; if(sstrcmp(type, sstr("AuthTrans")) == 0) { - dt = 0; + dt = NSAPIAuthTrans; } else if(sstrcmp(type, sstr("NameTrans")) == 0) { - dt = 1; + dt = NSAPINameTrans; } else if(sstrcmp(type, sstr("PathCheck")) == 0) { - dt = 2; + dt = NSAPIPathCheck; } else if(sstrcmp(type, sstr("ObjectType")) == 0) { - dt = 3; + dt = NSAPIObjectType; } else if(sstrcmp(type, sstr("Service")) == 0) { - dt = 4; + dt = NSAPIService; + } else if(sstrcmp(type, sstr("Error")) == 0) { + dt = NSAPIError; } else if(sstrcmp(type, sstr("AddLog")) == 0) { - dt = 5; + dt = NSAPIAddLog; } else if(sstrcmp(type, sstr("Init")) == 0) { - dt = 6; + dt = INIT_DIRECTIVE; } return dt; }