From: Jeremy Tan Date: Mon, 2 Sep 2013 05:17:56 +0000 (+0800) Subject: Add log message for any rejected requests X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=db50df50f4711142dba8f7aa83751fccc52b1e0d;p=matches%2FMCTX3420.git Add log message for any rejected requests --- diff --git a/server/fastcgi.c b/server/fastcgi.c index 29e85d3..2da4b12 100644 --- a/server/fastcgi.c +++ b/server/fastcgi.c @@ -265,6 +265,9 @@ void FCGI_RejectJSON(FCGIContext *context) */ void FCGI_RejectJSONEx(FCGIContext *context, StatusCodes status, const char *description) { + description = !description ? "" : description; + + Log(LOGINFO, "%s: Rejected query with: %d: %s", context->current_module, status, description); FCGI_BeginJSON(context, status); FCGI_JSONPair("description", description); FCGI_JSONLong("responsenumber", context->response_number);