Hi
we have developed the custom module which stores the registered users in a file.now we are trying to remove the expired contacts using the rtimer module.while saving the registered users to the file we also store the expires values in static array.but when we try to decrement the these values in a function called with the help of rtimer module. the values used by this periodic function are not modified ones but the initial which are zero. is it that we cant pass the modified values of the global variables to the timed functions. to get around this problem, we also registered the timer in our module but got same results !!!!!!!
Please Help.
Thanks and regards .
Hello,
the static array is stored on the private memory per process, thus cannot be updated by the timer.
You should allocate the array in shared memory at startup, then it should work to update it from different application processes. Be sure you synchronize (with locks/mutexes) the operations over the shared memory.
Cheers, Daniel
On 2/6/13 7:53 AM, kiran bhosale wrote:
Hi
we have developed the custom module which stores the registered users in a file.now we are trying to remove the expired contacts using the rtimer module.while saving the registered users to the file we also store the expires values in static array.but when we try to decrement the these values in a function called with the help of rtimer module. the values used by this periodic function are not modified ones but the initial which are zero. is it that we cant pass the modified values of the global variables to the timed functions. to get around this problem, we also registered the timer in our module but got same results !!!!!!!
Please Help.
Thanks and regards .
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users