From: Alan T. DeKok Date: Sun, 6 Dec 2009 12:39:00 +0000 (+0100) Subject: Be more specific about which detail files we suppress X-Git-Tag: release_2_1_8~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f8881b17d7913c1d413aed160ab8b24bb6a4296;p=thirdparty%2Ffreeradius-server.git Be more specific about which detail files we suppress Don't write packets back to the same detail file, but allow them to be written to different detail files --- diff --git a/src/modules/rlm_detail/rlm_detail.c b/src/modules/rlm_detail/rlm_detail.c index 56681fbbacc..fba5e9d4385 100644 --- a/src/modules/rlm_detail/rlm_detail.c +++ b/src/modules/rlm_detail/rlm_detail.c @@ -26,6 +26,7 @@ RCSID("$Id$") #include #include #include +#include #include #include @@ -475,7 +476,9 @@ static int do_detail(void *instance, REQUEST *request, RADIUS_PACKET *packet, */ static int detail_accounting(void *instance, REQUEST *request) { - if (request->listener->type == RAD_LISTEN_DETAIL) { + if (request->listener->type == RAD_LISTEN_DETAIL && + strcmp(((struct detail_instance *)instance)->detailfile, + ((listen_detail_t *)request->listener->data)->filename) == 0) { RDEBUG("Suppressing writes to detail file as the request was just read from a detail file."); return RLM_MODULE_NOOP; }