|
|
@ -35,11 +35,13 @@ route[PRESENCE_LOCAL_NOTIFY] |
|
|
|
|
|
|
|
|
modparam("mqueue","mqueue", "name=presence_last_notity") |
|
|
modparam("mqueue","mqueue", "name=presence_last_notity") |
|
|
|
|
|
|
|
|
#!ifndef TIMER_LOADED |
|
|
|
|
|
loadmodule "timer.so" |
|
|
|
|
|
#!trydef TIMER_LOADED |
|
|
|
|
|
|
|
|
####### RTIMER module ########## |
|
|
|
|
|
#!ifndef RTIMER_LOADED |
|
|
|
|
|
loadmodule "rtimer.so" |
|
|
|
|
|
#!trydef RTIMER_LOADED |
|
|
#!endif |
|
|
#!endif |
|
|
modparam("timer", "declare_timer", "PRESENCE_LOG_TIMER=PRESENCE_LOG_TIMER_ROUTE,500,fast,enable"); |
|
|
|
|
|
|
|
|
modparam("rtimer", "timer", "name=notifytimer;interval=500000u;mode=2;") |
|
|
|
|
|
modparam("rtimer", "exec", "timer=notifytimer;route=PRESENCE_LOG_TIMER_ROUTE") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event_route[presence:notify-reply] |
|
|
event_route[presence:notify-reply] |
|
|
@ -88,9 +90,9 @@ route[PRESENCE_LOG_TIMER_ROUTE] |
|
|
$var(runloop) = 1; |
|
|
$var(runloop) = 1; |
|
|
while(mq_fetch("presence_last_notity") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { |
|
|
while(mq_fetch("presence_last_notity") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { |
|
|
$var(ci) = $mqk(presence_last_notity); |
|
|
$var(ci) = $mqk(presence_last_notity); |
|
|
xlog("L_DEBUG", "Query : $mqv(presence_last_notity)"); |
|
|
|
|
|
|
|
|
xlog("L_DEBUG", "Query : $mqv(presence_last_notity)\n"); |
|
|
$var(sqlres) = sql_query("cb", "$mqv(presence_last_notity)"); |
|
|
$var(sqlres) = sql_query("cb", "$mqv(presence_last_notity)"); |
|
|
xlog("L_DEBUG", "Query result : $var(sqlres)"); |
|
|
|
|
|
|
|
|
xlog("L_DEBUG", "Query result : $var(sqlres)\n"); |
|
|
if($var(sqlres) < 0) { |
|
|
if($var(sqlres) < 0) { |
|
|
xlog("L_ERROR", "$var(ci)|log|error updating active_watchers_log\n"); |
|
|
xlog("L_ERROR", "$var(ci)|log|error updating active_watchers_log\n"); |
|
|
} else { |
|
|
} else { |
|
|
|