]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't write empty packets to the detail file
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jan 2017 20:34:30 +0000 (15:34 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jan 2017 20:42:52 +0000 (15:42 -0500)
src/modules/rlm_detail/rlm_detail.c

index 3406381e6043a3ca7f7c6c2682640203ef5575ee..9ab4761efbbbff09fc03ecb78df34638429e49c1 100644 (file)
@@ -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));\