Module: kamailio
Branch: master
Commit: ee11732bdc1637d646b772ce22d43bd571f7a736
URL:
https://github.com/kamailio/kamailio/commit/ee11732bdc1637d646b772ce22d43bd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-05-15T08:52:29+02:00
usrloc: coonect to db from rpc processes
- evapi consumers are using rpc rank and there can be save/lookup
operations
- reported by GH #622
---
Modified: modules/usrloc/ul_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ee11732bdc1637d646b772ce22d43bd…
Patch:
https://github.com/kamailio/kamailio/commit/ee11732bdc1637d646b772ce22d43bd…
---
diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c
index fa72e2b..0e1a452 100644
--- a/modules/usrloc/ul_mod.c
+++ b/modules/usrloc/ul_mod.c
@@ -421,8 +421,10 @@ static int child_init(int _rank)
return 0;
case DB_ONLY:
case WRITE_THROUGH:
- /* connect to db only from SIP workers, TIMER and MAIN processes */
- if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN)
+ /* connect to db only from SIP workers, TIMER and MAIN processes,
+ * and RPC processes */
+ if (_rank<=0 && _rank!=PROC_TIMER && _rank!=PROC_MAIN
+ && _rank!=PROC_RPC)
return 0;
break;
case WRITE_BACK: