Module: kamailio Branch: master Commit: 5a96993efd6cff7677a5c49fee15c30715903ea0 URL: https://github.com/kamailio/kamailio/commit/5a96993efd6cff7677a5c49fee15c30715903ea0
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2021-04-01T00:01:22+02:00 topos: use context for sruid --- Modified: src/modules/topos/tps_storage.c --- Diff: https://github.com/kamailio/kamailio/commit/5a96993efd6cff7677a5c49fee15c30715903ea0.diff Patch: https://github.com/kamailio/kamailio/commit/5a96993efd6cff7677a5c49fee15c30715903ea0.patch --- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index 9ce19dd1a0..5efe57b0e4 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -64,6 +64,9 @@ extern pv_spec_t _tps_bcontact_spec; extern str _tps_contact_host_avp; extern pv_spec_t _tps_contact_host_avp_spec; +extern str _tps_context_param; +extern str _tps_context_value; + #define TPS_STORAGE_LOCK_SIZE 1<<9 static gen_lock_set_t *_tps_storage_lock_set = NULL; @@ -546,9 +549,16 @@ int tps_storage_record(sip_msg_t *msg, tps_data_t *td, int dialog, int dir) { int ret = -1; /* error if dialog == 0 */ str suid; + str *sx = NULL; + + if(_tps_context_value.len>0) { + sx = &_tps_context_value; + } else if(_tps_context_param.len>0) { + sx = &_tps_context_param; + } if(dialog==0) { - sruid_next(&_tps_sruid); + sruid_nextx(&_tps_sruid, sx); suid = _tps_sruid.uid; } else { if(td->a_uuid.len>0) { _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
