utils: Add enum name for pseudo log group 'any'
This commit is contained in:
@@ -590,17 +590,10 @@ static void stroke_loglevel(private_stroke_socket_t *this,
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
ENUM(debug_names, DBG_DMN, DBG_LIB,
|
||||
ENUM(debug_names, DBG_DMN, DBG_ANY,
|
||||
"DMN",
|
||||
"MGR",
|
||||
"IKE",
|
||||
@@ -36,9 +36,10 @@ ENUM(debug_names, DBG_DMN, DBG_LIB,
|
||||
"APP",
|
||||
"ESP",
|
||||
"LIB",
|
||||
"ANY",
|
||||
);
|
||||
|
||||
ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
|
||||
ENUM(debug_lower_names, DBG_DMN, DBG_ANY,
|
||||
"dmn",
|
||||
"mgr",
|
||||
"ike",
|
||||
@@ -57,6 +58,7 @@ ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
|
||||
"app",
|
||||
"esp",
|
||||
"lib",
|
||||
"any",
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user