diff --git a/debian/patches/series b/debian/patches/series index 8aff2f737..944d8d041 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -29,6 +29,7 @@ upstream/avpops-allow-xavp-semantics-on-second-parameter.patch upstream/acc-new-parameter-time_mode.patch upstream/0001-tm-fix-possible-segfault-in-cancel_branch.patch upstream/0001-modules-usrloc-reduce-work-if-contact-attributes-are.patch +upstream/0001-modules-usrloc-fixed-unregister-bug-in-db_mode-3.patch upstream/0001-usrloc-db_update-contact-by-instance-reg-id.patch upstream/0002-registrar-clean-static-values-at-pack_ci.patch no_lib64_on_64_bits.patch diff --git a/debian/patches/upstream/0001-modules-usrloc-fixed-unregister-bug-in-db_mode-3.patch b/debian/patches/upstream/0001-modules-usrloc-fixed-unregister-bug-in-db_mode-3.patch new file mode 100644 index 000000000..0441237ce --- /dev/null +++ b/debian/patches/upstream/0001-modules-usrloc-fixed-unregister-bug-in-db_mode-3.patch @@ -0,0 +1,68 @@ +From 2669197352bfc20bc916c00f74ac14380f8a62f8 Mon Sep 17 00:00:00 2001 +From: Juha Heinanen +Date: Mon, 20 May 2013 21:03:30 +0300 +Subject: [PATCH] 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 file 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) { +-- +1.7.10.4 +