fprintf(out, "command not allowed!\n");
return;
}
- if (strcaseeq(msg->loglevel.type, "any"))
+ if (!enum_from_name(debug_names, msg->loglevel.type, &group))
{
- group = DBG_ANY;
- }
- else
- {
- if (!enum_from_name(debug_names, msg->loglevel.type, &group))
- {
- fprintf(out, "unknown type '%s'!\n", msg->loglevel.type);
- return;
- }
+ fprintf(out, "unknown type '%s'!\n", msg->loglevel.type);
+ return;
}
charon->set_level(charon, group, msg->loglevel.level);
}
#include "debug.h"
-ENUM(debug_names, DBG_DMN, DBG_LIB,
+ENUM(debug_names, DBG_DMN, DBG_ANY,
"DMN",
"MGR",
"IKE",
"APP",
"ESP",
"LIB",
+ "ANY",
);
-ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
+ENUM(debug_lower_names, DBG_DMN, DBG_ANY,
"dmn",
"mgr",
"ike",
"app",
"esp",
"lib",
+ "any",
);
/**