Module: sip-router
Branch: master
Commit: d684d1ac49f740d32df5f82add584aeb396e26a4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d684d1a…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Fri Dec 7 01:33:52 2012 +0200
modules_k/registrar: ignore reg-id if instance-id is not included
---
modules_k/registrar/save.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/registrar/save.c b/modules_k/registrar/save.c
index 517f12e..3188050 100644
--- a/modules_k/registrar/save.c
+++ b/modules_k/registrar/save.c
@@ -363,7 +363,7 @@ static inline ucontact_info_t* pack_ci( struct sip_msg* _m, contact_t*
_c,
}
if(_c->instance!=NULL && _c->instance->body.len>0)
ci.instance = _c->instance->body;
- if(_c->reg_id!=NULL && _c->reg_id->body.len>0) {
+ if(_c->instance!=NULL && _c->reg_id!=NULL &&
_c->reg_id->body.len>0) {
if(str2int(&_c->reg_id->body, &ci.reg_id)<0)
{
LM_ERR("invalid reg-id value\n");