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:
Module: kamailio
Branch: master
Commit: c7c8d31e4a4f9640673099aa1589e3fe96fad558
URL: https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-05-13T10:28:23+02:00
dmq_usrloc: fix compiler warning #612
> CC (gcc) [M dmq_usrloc.so] usrloc_sync.o
> usrloc_sync.c: In function 'usrloc_dmq_handle_msg':
> usrloc_sync.c:403:12: warning: 'reg_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.reg_id = reg_id;
> ^
> usrloc_sync.c:401:13: warning: 'methods' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.methods = methods;
> ^
> usrloc_sync.c:405:19: warning: 'last_modified' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.last_modified = last_modified;
> ^
> usrloc_sync.c:394:7: warning: 'q' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.q = q;
> ^
> usrloc_sync.c:399:12: warning: 'cflags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.cflags = cflags;
> ^
> usrloc_sync.c:397:11: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.flags = flags;
> ^
> usrloc_sync.c:396:10: warning: 'cseq' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.cseq = cseq;
> ^
> usrloc_sync.c:393:13: warning: 'expires' may be used uninitialized in this function [-Wmaybe-uninitialized]
> ci.expires = expires;
> ^
> usrloc_sync.c:407:2: warning: 'action' may be used uninitialized in this function [-Wmaybe-uninitialized]
> switch(action) {
> ^
> make[3]: 'libsrutils.so.1.0' is up to date.
---
Modified: modules/dmq_usrloc/usrloc_sync.c
---
Diff: https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
Patch: https://github.com/kamailio/kamailio/commit/c7c8d31e4a4f9640673099aa1589e3f…
---
diff --git a/modules/dmq_usrloc/usrloc_sync.c b/modules/dmq_usrloc/usrloc_sync.c
index f89500d..86e34ac 100644
--- a/modules/dmq_usrloc/usrloc_sync.c
+++ b/modules/dmq_usrloc/usrloc_sync.c
@@ -301,6 +301,8 @@ int usrloc_dmq_handle_msg(struct sip_msg* msg, peer_reponse_t* resp, dmq_node_t*
int action, expires, cseq, flags, cflags, q, last_modified, methods, reg_id;
str aor, ruid, c, received, path, callid, user_agent, instance;
+ action = expires = cseq = flags = cflags = q = last_modified = methods = reg_id = 0;
+
parse_from_header(msg);
body = ((struct to_body*)msg->from->parsed)->uri;