Module: kamailio
Branch: master
Commit: 6f89332ebbeb43862236c8a6a5686535a4e6caeb
URL:
https://github.com/kamailio/kamailio/commit/6f89332ebbeb43862236c8a6a568653…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-04-12T12:21:52+02:00
core: guarded bitwise test
---
Modified: src/core/msg_translator.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6f89332ebbeb43862236c8a6a568653…
Patch:
https://github.com/kamailio/kamailio/commit/6f89332ebbeb43862236c8a6a568653…
---
diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index e7a6deeeb2..fe7eb6b491 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -2909,7 +2909,7 @@ char* create_via_hf( unsigned int *len,
}
/* test and add srvid parameter to local via */
- if(msg && msg->msg_flags&FL_ADD_SRVID && server_id!=0) {
+ if(msg && (msg->msg_flags&FL_ADD_SRVID) && server_id!=0) {
slen = snprintf(sbuf, 24, ";srvid=%u", (unsigned int)server_id);
if(slen<=0 || slen>=24) {
LM_WARN("failed to buld srvid parameter");