Module: sip-router
Branch: master
Commit: 2669197352bfc20bc916c00f74ac14380f8a62f8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2669197…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Mon May 20 21:03:30 2013 +0300
modules/usrloc: fixed unregister bug in db_mode=3
- Commit ce1d16ce1c8009918c294307de53f35378868b52 introduced unregister
but that appeared in db_mode=3 when db_ops_ruid param is not set.
- Reported by Peter Dunkley.
---
modules/usrloc/ucontact.c | 42 ++++++++++++++++++++----------------------
1 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index 593bb1e..c8da8ec 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -1061,28 +1061,26 @@ int db_delete_ucontact_addr(ucontact_t* _c)
vals[n].val.str_val = _c->callid;
n++;
- if (ul_xavp_contact_name.s) {
- if (use_domain) {
- keys[n] = &domain_col;
- vals[n].type = DB1_STR;
- vals[n].nul = 0;
- dom = memchr(_c->aor->s, '@', _c->aor->len);
- if (dom==0) {
- vals[0].val.str_val.len = 0;
- vals[n].val.str_val = *_c->aor;
- } else {
- vals[0].val.str_val.len = dom - _c->aor->s;
- vals[n].val.str_val.s = dom + 1;
- vals[n].val.str_val.len = _c->aor->s +
- _c->aor->len - dom - 1;
- }
- uldb_delete_attrs(_c->domain, &vals[0].val.str_val,
- &vals[n].val.str_val, &_c->ruid);
- n++;
- } else {
- uldb_delete_attrs(_c->domain, &vals[0].val.str_val,
- NULL, &_c->ruid);
- }
+ if (use_domain) {
+ keys[n] = &domain_col;
+ vals[n].type = DB1_STR;
+ vals[n].nul = 0;
+ dom = memchr(_c->aor->s, '@', _c->aor->len);
+ if (dom==0) {
+ vals[0].val.str_val.len = 0;
+ vals[n].val.str_val = *_c->aor;
+ } else {
+ vals[0].val.str_val.len = dom - _c->aor->s;
+ vals[n].val.str_val.s = dom + 1;
+ vals[n].val.str_val.len = _c->aor->s +
+ _c->aor->len - dom - 1;
+ }
+ uldb_delete_attrs(_c->domain, &vals[0].val.str_val,
+ &vals[n].val.str_val, &_c->ruid);
+ n++;
+ } else {
+ uldb_delete_attrs(_c->domain, &vals[0].val.str_val,
+ NULL, &_c->ruid);
}
if (ul_dbf.use_table(ul_dbh, _c->domain) < 0) {