]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
only do clear if it's configured
authorAlan T. DeKok <aland@freeradius.org>
Mon, 21 Jan 2019 20:00:27 +0000 (15:00 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 21 Jan 2019 20:40:52 +0000 (15:40 -0500)
src/modules/rlm_sqlippool/rlm_sqlippool.c

index 1b352ef8588975b870ac33be900549816ffe9abc..3eb4f12a95d7c844104c85f72a8a5072a3150258 100644 (file)
@@ -557,7 +557,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(void *instance, REQUEST *reque
         *      we're only do 1 CLEAR per second.
         */
        now = time(NULL);
-       if (inst->last_clear < now) {
+       if (inst->allocate_clear && *inst->allocate_clear && (inst->last_clear < now)) {
                inst->last_clear = now;
 
                DO_PART(allocate_begin);