From: Alan T. DeKok Date: Tue, 15 Jan 2019 19:21:04 +0000 (-0500) Subject: don't print two error messages X-Git-Tag: release_3_0_18~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a671b4d60e8be949913cd381b3baa6685fa63dfb;p=thirdparty%2Ffreeradius-server.git don't print two error messages --- diff --git a/src/main/process.c b/src/main/process.c index a0a0e20c4f6..5b71e5268d2 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -4508,6 +4508,17 @@ static bool coa_max_time(REQUEST *request) if (timercmp(&now, &when, >=)) { char buffer[256]; + if (request->process != coa_running) { + RERROR("Failing request - originate-coa ID %u, due to lack of any response from coa server %s port %d within %d seconds", + request->proxy->id, + inet_ntop(request->proxy->dst_ipaddr.af, + &request->proxy->dst_ipaddr.ipaddr, + buffer, sizeof(buffer)), + request->proxy->dst_port, + request->home_server->coa_mrd); + goto done; + } + #ifdef HAVE_PTHREAD_H /* * If there's a child thread processing it, @@ -4515,21 +4526,15 @@ static bool coa_max_time(REQUEST *request) */ if (spawn_flag && (pthread_equal(request->child_pid, NO_SUCH_CHILD_PID) == 0)) { - ERROR("Unresponsive child for originate-coa request %u, in component %s module %s", - request->number, + RERROR("Unresponsive child for originate-coa, in component %s module %s", request->component ? request->component : "", request->module ? request->module : ""); exec_trigger(request, NULL, "server.thread.unresponsive", true); - } + } else #endif - - RERROR("Failing request - originate-coa ID %u, due to lack of any response from coa server %s port %d within %d seconds", - request->proxy->id, - inet_ntop(request->proxy->dst_ipaddr.af, - &request->proxy->dst_ipaddr.ipaddr, - buffer, sizeof(buffer)), - request->proxy->dst_port, - request->home_server->coa_mrd); + { + RERROR("originate-coa hit max_request_time. Cancelling it."); + } /* * Tell the request that it's done.