rlm_sqlcounter

Devrim Seral dseral at gmail.com
Sat May 20 13:15:49 CEST 2006


Hi all list members,
I have a little question about rlm_sqlcounter. As you know sqlcounter have some
predefined reset time attribute.

This reset time to be "hourly, weekly, monthly and never". However i
need another reset times like 3 mounth, 6 mounth and yearly..

My investigation  show me that:

        if (isdigit((int) data->reset[0])){
                unsigned int len=0;

                len = strlen(data->reset);
                if (len == 0)
                        return -1;
                last = data->reset[len - 1];
                if (!isalpha((int) last))
                        last = 'd';
/*              num = atoi(data->reset);  */
                DEBUG("rlm_sqlcounter: num=%d, last=%c",num,last);
        }

Freeradius rlm_sqlcounter module have above C codes. This code allow us to
define reset time as i want.  But  num = atoi(data->reset);  is commented..
So when i tried to define reset time "3m" rlm_sqlcounter only set 1
month reset time because of num value!

I wonder that is anybody in there use other values than predefined?
Or itis safe to uncomment "num = atoi(data->reset);" in
find_next_reset function?

Thanks for your reply..
devrim




More information about the Freeradius-Users mailing list