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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=add5fc00fbc276edfa5e2531917f99f5c72e99a8;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 3406381e604..9ab4761efbb 100644 --- a/src/modules/rlm_detail/rlm_detail.c +++ b/src/modules/rlm_detail/rlm_detail.c @@ -227,6 +227,11 @@ static int detail_write(FILE *out, rlm_detail_t const *inst, REQUEST *request, R return -1; } + if (!packet->vps) { + RWDEBUG("Skipping empty packet"); + return 0; + } + #define WRITE(fmt, ...) do {\ if (fprintf(out, fmt, ## __VA_ARGS__) < 0) {\ RERROR("Failed writing to detail file: %s", fr_syserror(errno));\