[sr-dev] git:master:e5ec5a44: Merge pull request #279 from kamailio/vseva/registrar_max_contacts_instance
Victor Seva
linuxmaniac at torreviejawireless.org
Fri Aug 7 11:27:47 CEST 2015
Module: kamailio
Branch: master
Commit: e5ec5a443aaec732390bae6247fe561ea312b709
URL: https://github.com/kamailio/kamailio/commit/e5ec5a443aaec732390bae6247fe561ea312b709
Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2015-08-07T11:27:42+02:00
Merge pull request #279 from kamailio/vseva/registrar_max_contacts_instance
registrar: ci_pack, get instance and ref_id when using msg
---
Modified: modules/registrar/save.c
---
Diff: https://github.com/kamailio/kamailio/commit/e5ec5a443aaec732390bae6247fe561ea312b709.diff
Patch: https://github.com/kamailio/kamailio/commit/e5ec5a443aaec732390bae6247fe561ea312b709.patch
---
diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index ae311e8..1ebb849 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -307,6 +307,20 @@ static inline ucontact_info_t* pack_ci( struct sip_msg* _m, contact_t* _c,
}
ci.server_id = server_id;
+ if(_m->contact) {
+ _c = (((contact_body_t*)_m->contact->parsed)->contacts);
+ if(_c->instance!=NULL && _c->instance->body.len>0) {
+ ci.instance = _c->instance->body;
+ LM_DBG("set instance[%.*s]\n", ci.instance.len, ci.instance.s);
+ }
+ if(_use_regid && _c->instance!=NULL && _c->reg_id!=NULL && _c->reg_id->body.len>0) {
+ if(str2int(&_c->reg_id->body, &ci.reg_id)<0 || ci.reg_id==0)
+ {
+ LM_ERR("invalid reg-id value\n");
+ goto error;
+ }
+ }
+ }
allow_parsed = 0; /* not parsed yet */
received_found = 0; /* not found yet */
More information about the sr-dev
mailing list