diff -r 8ddd39bcf2ec -r b972dc20871f opensips/opensips.patch.uac --- a/opensips/opensips.patch.uac Wed Sep 21 14:31:41 2011 +0200 +++ b/opensips/opensips.patch.uac Wed Sep 21 16:06:14 2011 +0200 @@ -2,7 +2,7 @@ diff -Nau modules/uac/auth.c.orig modules/uac/auth.c --- modules/uac/auth.c.orig 2008-08-03 15:53:40.000000000 +0200 +++ modules/uac/auth.c 2009-03-24 21:48:53.478867420 +0100 -@@ -143,14 +143,172 @@ +@@ -375,14 +375,172 @@ HASHHEX response; str *new_hdr; @@ -70,7 +70,7 @@ + crd->passwd = pv_val.rs; + + if (nret) { /* if not found, look into predefined credentials */ -+ tst = uac_auth_api._lookup_realm(&crd->realm); ++ tst = lookup_realm(&crd->realm); + + if (tst==0) { /* found? */ + LM_DBG("no credential for realm \"%.*s\"\n", \ @@ -121,25 +121,25 @@ + + /* set the nonce from existing UAC message */ + tmp_hdr = msg->proxy_auth; -+ auth->nonce.len = 0; -+ auth->nonce.s = 0; ++ auth.nonce.len = 0; ++ auth.nonce.s = 0; + while (tmp_hdr) { + if(pv_get_spec_value(msg, &auth_realm_spec, &pv_val)==0 \ + && pv_val.rs.len>0) /* ensure realm is the desired one */ + if (strncmp(crd->realm.s, pv_val.rs.s, crd->realm.len)==0) { -+ auth->nonce.s = strchr(strstr(tmp_hdr->body.s, "nonce="), '"') + 1; -+ auth->nonce.len = strchr(auth->nonce.s, '"') - auth->nonce.s; ++ auth.nonce.s = strchr(strstr(tmp_hdr->body.s, "nonce="), '"') + 1; ++ auth.nonce.len = strchr(auth.nonce.s, '"') - auth.nonce.s; + } + tmp_hdr = tmp_hdr->sibling; + } -+ if (auth->nonce.s == 0) { ++ if (auth.nonce.s == 0) { + LM_DBG("failed to retrieve nonce from UAC message\n"); + pkg_free(crd); + goto error; + } + + /* do authentication */ -+ uac_auth_api._do_uac_auth(msg, newuri, crd, auth, &auth_nc_cnonce, response); ++ do_uac_auth(msg, newuri, crd, &auth, response); + if (response==0) { + LM_ERR("failed to calculate challenge response\n"); + pkg_free(crd); @@ -147,7 +147,7 @@ + } + + /* build the authorization header */ -+ new_hdr = uac_auth_api._build_authorization_hdr(407, newuri, crd, auth, &auth_nc_cnonce, response); ++ new_hdr = build_authorization_hdr(407, newuri, crd, &auth, response); + if (new_hdr==0) { + LM_ERR("failed to build authorization hdr\n"); + pkg_free(crd); @@ -184,7 +184,7 @@ diff -Nau modules/uac/uac.c.orig modules/uac/uac.c --- modules/uac/uac.c.orig 2008-08-03 15:53:40.000000000 +0200 +++ modules/uac/uac.c 2009-03-24 21:49:48.922890737 +0100 -@@ -117,7 +117,7 @@ +@@ -106,7 +106,7 @@ REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE }, {"uac_auth", (cmd_function)w_uac_auth, 0, 0, 0,