MCPcopy Create free account
hub / github.com/apache/httpd / process_item

Function process_item

modules/loggers/mod_log_config.c:1068–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1066 */
1067
1068static const char *process_item(request_rec *r, request_rec *orig,
1069 log_format_item *item)
1070{
1071 const char *cp;
1072
1073 /* First, see if we need to process this thing at all... */
1074
1075 if (item->conditions && item->conditions->nelts != 0) {
1076 int i;
1077 int *conds = (int *) item->conditions->elts;
1078 int in_list = 0;
1079
1080 for (i = 0; i < item->conditions->nelts; ++i) {
1081 if (r->status == conds[i]) {
1082 in_list = 1;
1083 break;
1084 }
1085 }
1086
1087 if ((item->condition_sense && in_list)
1088 || (!item->condition_sense && !in_list)) {
1089 return "-";
1090 }
1091 }
1092
1093 /* We do. Do it... */
1094
1095 cp = (*item->func) (item->want_orig ? orig : r, item->arg);
1096 return cp ? cp : "-";
1097}
1098
1099static void flush_log(buffered_log *buf)
1100{

Callers 1

config_log_transactionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected