From: Alan T. DeKok Date: Thu, 26 Jan 2017 20:34:30 +0000 (-0500) Subject: don't write empty packets to the detail file X-Git-Tag: release_3_0_13~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09d21947517c062fa8c3c71f70bc8c51c95cb95b;p=thirdparty%2Ffreeradius-server.git don't write empty packets to the detail file --- diff --git a/src/modules/rlm_detail/rlm_detail.c b/src/modules/rlm_detail/rlm_detail.c index cc9bd6c5cc7..d5f1f68107a 100644 --- a/src/modules/rlm_detail/rlm_detail.c +++ b/src/modules/rlm_detail/rlm_detail.c @@ -224,6 +224,11 @@ static int detail_write(FILE *out, rlm_detail_t *inst, REQUEST *request, RADIUS_ VALUE_PAIR *vp; char timestamp[256]; + if (!packet->vps) { + RWDEBUG("Skipping empty packet"); + return 0; + } + if (radius_xlat(timestamp, sizeof(timestamp), request, inst->header, NULL, NULL) < 0) { return -1; }