Module: kamailio
Branch: master
Commit: 883d49d5ed2cc6140c583559d0f61bde3fa6fdb5
URL:
https://github.com/kamailio/kamailio/commit/883d49d5ed2cc6140c583559d0f61bd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-01-15T16:43:18+01:00
topos_redis: store tags in transaction records
---
Modified: src/modules/topos_redis/topos_redis_storage.c
---
Diff:
https://github.com/kamailio/kamailio/commit/883d49d5ed2cc6140c583559d0f61bd…
Patch:
https://github.com/kamailio/kamailio/commit/883d49d5ed2cc6140c583559d0f61bd…
---
diff --git a/src/modules/topos_redis/topos_redis_storage.c
b/src/modules/topos_redis/topos_redis_storage.c
index 91aff1a410..b0086478e2 100644
--- a/src/modules/topos_redis/topos_redis_storage.c
+++ b/src/modules/topos_redis/topos_redis_storage.c
@@ -477,6 +477,9 @@ int tps_redis_insert_branch(tps_data_t *td)
TPS_REDIS_SET_ARGS(&td->as_contact, argc, &tt_key_as_contact, argv,
argvlen);
TPS_REDIS_SET_ARGS(&td->bs_contact, argc, &tt_key_bs_contact, argv,
argvlen);
+ TPS_REDIS_SET_ARGS(&td->a_tag, argc, &tt_key_a_tag, argv, argvlen);
+ TPS_REDIS_SET_ARGS(&td->b_tag, argc, &tt_key_b_tag, argv, argvlen);
+
rrpl = _tps_redis_api.exec_argv(rsrv, argc, (const char **)argv, argvlen);
if(rrpl==NULL) {
LM_ERR("failed to execute redis command\n");
@@ -869,6 +872,12 @@ int tps_redis_load_branch(sip_msg_t *msg, tps_data_t *md, tps_data_t
*sd,
} else if(skey.len==tt_key_bs_contact.len
&& strncmp(skey.s, tt_key_bs_contact.s, skey.len)==0) {
TPS_REDIS_DATA_APPEND(sd, &skey, &sval, &sd->bs_contact);
+ } else if(skey.len==tt_key_a_tag.len
+ && strncmp(skey.s, tt_key_a_tag.s, skey.len)==0) {
+ TPS_REDIS_DATA_APPEND(sd, &skey, &sval, &sd->a_tag);
+ } else if(skey.len==tt_key_b_tag.len
+ && strncmp(skey.s, tt_key_b_tag.s, skey.len)==0) {
+ TPS_REDIS_DATA_APPEND(sd, &skey, &sval, &sd->b_tag);
} else {
LM_WARN("unknow key[%.*s]\n", skey.len, skey.s);
}