1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Make AJP trace messages a bit less cryptic.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1152450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Jung
2011-07-30 10:54:04 +00:00
parent bed1021e56
commit a7fe66131c
3 changed files with 50 additions and 8 deletions

View File

@@ -105,3 +105,31 @@ cleanup:
"ajp_handle_cping_cpong: Done");
return rv;
}
#define case_to_str(x) case CMD_AJP13_##x:\
return #x;\
break;
/**<2A>
* Convert numeric message type into string
* @param type AJP message type
* @return AJP message type as a string
*/
const char *ajp_type_str(int type)
{
switch (type) {
case_to_str(FORWARD_REQUEST)
case_to_str(SEND_BODY_CHUNK)
case_to_str(SEND_HEADERS)
case_to_str(END_RESPONSE)
case_to_str(GET_BODY_CHUNK)
case_to_str(SHUTDOWN)
case_to_str(PING)
case_to_str(CPONG)
case_to_str(CPING)
default:
return "CMD_AJP13_UNKNOWN";
}
}