Adds ap_log_cerror_ to the standalone implementation

This commit is contained in:
Felipe Zimmerle 2017-05-04 13:25:31 -03:00
parent 7bdb79a1a2
commit b6293988fe
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -285,6 +285,33 @@ AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
modsecLogHook(modsecLogObj, level, errstr);
}
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
AP_DECLARE(void) ap_log_cerror(const char *file, int line, int level,
apr_status_t status, const conn_rec *r,
const char *fmt, ...)
// __attribute__((format(printf,6,7)))
#else
AP_DECLARE(void) ap_log_cerror_(const char *file, int line, int module_index,
int level, apr_status_t status,
const conn_rec *c, const char *fmt, ...)
// __attribute__((format(printf,7,8)))
#endif
{
va_list args;
char errstr[MAX_STRING_LEN];
va_start(args, fmt);
apr_vsnprintf(errstr, MAX_STRING_LEN, fmt, args);
va_end(args);
if(modsecLogHook != NULL)
modsecLogHook(modsecLogObj, level, errstr);
}
#if AP_SERVER_MAJORVERSION_NUMBER > 1 && AP_SERVER_MINORVERSION_NUMBER < 3
AP_DECLARE(void) ap_log_rerror(const char *file, int line, int level,
apr_status_t status, const request_rec *r,