Module: kamailio
Branch: master
Commit: 9a152cbd15a84191418ecd3bbb56dff48438bfd1
URL:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-11-05T13:33:36+01:00
usrloc: handle return code when registering the timer routine
---
Modified: modules/usrloc/ul_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
Patch:
https://github.com/kamailio/kamailio/commit/9a152cbd15a84191418ecd3bbb56dff…
---
diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c
index c111ea7..958c966 100644
--- a/modules/usrloc/ul_mod.c
+++ b/modules/usrloc/ul_mod.c
@@ -358,7 +358,10 @@ static int mod_init(void)
}
if(db_mode==WRITE_THROUGH || db_mode==WRITE_BACK) {
if(ul_db_timer_clean!=0) {
- sr_wtimer_add(ul_db_clean_timer, 0, timer_interval);
+ if(sr_wtimer_add(ul_db_clean_timer, 0, timer_interval)<0) {
+ LM_ERR("failed to add db clean timer routine\n");
+ return -1;
+ }
}
}