Skip to content

Commit

Permalink
Revert "pua_reginfo: use ul.get_urecord_by_ruid instead of ul.get_ure…
Browse files Browse the repository at this point in the history
…cord"

This reverts commit 9a6d8d2.
  • Loading branch information
linuxmaniac committed Aug 6, 2015
1 parent 4717b5b commit cb644d5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions modules/pua_reginfo/usrloc_cb.c
Expand Up @@ -224,9 +224,9 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) {
str content_type;
udomain_t * domain;
urecord_t * record;
ucontact_t* _c = NULL;
int res;
str uri = {NULL, 0};
str user = {NULL, 0};

char* at = NULL;
char id_buf[512];
Expand All @@ -251,6 +251,9 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) {
LM_ERR("Unknown Type %i\n", type);
return;
}
/* make a local copy of the AOR */
user.len = c->aor->len;
user.s = c->aor->s;

/* Get the UDomain for this account */
res = ul.get_udomain(c->domain->s, &domain);
Expand All @@ -259,11 +262,10 @@ void reginfo_usrloc_cb(ucontact_t* c, int type, void* param) {
return;
}

/* Get the URecord for this ruid */
res = ul.get_urecord_by_ruid(domain, ul.get_aorhash(c->aor), &(c->ruid),
&record, &_c);
if (res < 0) {
LM_ERR("'%.*s (%.*s)' Not found in usrloc\n", c->aor->len, c->aor->s, c->domain->len, c->domain->s);
/* Get the URecord for this AOR */
res = ul.get_urecord(domain, &user, &record);
if (res > 0) {
LM_ERR("' %.*s (%.*s)' Not found in usrloc\n", c->aor->len, c->aor->s, c->domain->len, c->domain->s);
return;
}

Expand Down

0 comments on commit cb644d5

Please sign in to comment.