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");
|
fprintf(out, "command not allowed!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strcaseeq(msg->loglevel.type, "any"))
|
if (!enum_from_name(debug_names, msg->loglevel.type, &group))
|
||||||
{
|
{
|
||||||
group = DBG_ANY;
|
fprintf(out, "unknown type '%s'!\n", msg->loglevel.type);
|
||||||
}
|
return;
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!enum_from_name(debug_names, msg->loglevel.type, &group))
|
|
||||||
{
|
|
||||||
fprintf(out, "unknown type '%s'!\n", msg->loglevel.type);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
charon->set_level(charon, group, msg->loglevel.level);
|
charon->set_level(charon, group, msg->loglevel.level);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
ENUM(debug_names, DBG_DMN, DBG_LIB,
|
ENUM(debug_names, DBG_DMN, DBG_ANY,
|
||||||
"DMN",
|
"DMN",
|
||||||
"MGR",
|
"MGR",
|
||||||
"IKE",
|
"IKE",
|
||||||
@@ -36,9 +36,10 @@ ENUM(debug_names, DBG_DMN, DBG_LIB,
|
|||||||
"APP",
|
"APP",
|
||||||
"ESP",
|
"ESP",
|
||||||
"LIB",
|
"LIB",
|
||||||
|
"ANY",
|
||||||
);
|
);
|
||||||
|
|
||||||
ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
|
ENUM(debug_lower_names, DBG_DMN, DBG_ANY,
|
||||||
"dmn",
|
"dmn",
|
||||||
"mgr",
|
"mgr",
|
||||||
"ike",
|
"ike",
|
||||||
@@ -57,6 +58,7 @@ ENUM(debug_lower_names, DBG_DMN, DBG_LIB,
|
|||||||
"app",
|
"app",
|
||||||
"esp",
|
"esp",
|
||||||
"lib",
|
"lib",
|
||||||
|
"any",
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user