Skip to content

Commit

Permalink
lib/ims: if no domain for IMPI fallback to IMPU
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybeepee committed Dec 12, 2016
1 parent 07310c6 commit a23f4e6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/ims/ims_getters.c
Expand Up @@ -159,8 +159,13 @@ str cscf_get_private_identity(struct sip_msg *msg, str realm) {
return pi;
}

if (h) pi = ((auth_body_t*) h->parsed)->digest.username.whole;

if (h) {
pi = ((auth_body_t*) h->parsed)->digest.username.whole;
if (memchr(pi.s, '@', pi.len) == 0) {
LM_DBG("no domain in username - required for IMPI - falling back to IMPU\n");
goto fallback;
}
}
goto done;

fallback:
Expand Down

0 comments on commit a23f4e6

Please sign in to comment.