[sr-dev] git:master:63952aca: modules/ims_auth lib/ims: use header type instead of header flag

Mikko Lehto mslehto at iki.fi
Fri Jun 3 09:25:48 CEST 2016


Module: kamailio
Branch: master
Commit: 63952acae078004807732206029791f8b0f271c8
URL: https://github.com/kamailio/kamailio/commit/63952acae078004807732206029791f8b0f271c8

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-05-25T13:49:00+03:00

modules/ims_auth lib/ims: use header type instead of header flag

---

Modified: lib/ims/ims_getters.c
Modified: modules/ims_auth/utils.c

---

Diff:  https://github.com/kamailio/kamailio/commit/63952acae078004807732206029791f8b0f271c8.diff
Patch: https://github.com/kamailio/kamailio/commit/63952acae078004807732206029791f8b0f271c8.patch

---

diff --git a/lib/ims/ims_getters.c b/lib/ims/ims_getters.c
index 5765ba9..74e8180 100644
--- a/lib/ims/ims_getters.c
+++ b/lib/ims/ims_getters.c
@@ -132,9 +132,9 @@ str cscf_get_private_identity(struct sip_msg *msg, str realm) {
 	}
 		
 	if (realm.len && realm.s) {
-		ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_F, &h);
+		ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_T, &h);
 		if (ret < 0) {
-			ret = find_credentials(msg, &realm, HDR_PROXYAUTH_F, &h);
+			ret = find_credentials(msg, &realm, HDR_PROXYAUTH_T, &h);
 			if (ret < 0) {
 				goto fallback;
 			} else {
@@ -202,7 +202,7 @@ str cscf_get_private_identity_from(struct sip_msg *msg, str realm)
 	}
         
         if (realm.len && realm.s) {
-            ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_F, &h);
+            ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_T, &h);
             if (ret < 0) {
                     goto fallback;
             } else 
diff --git a/modules/ims_auth/utils.c b/modules/ims_auth/utils.c
index fbc8ee7..aca0ca4 100644
--- a/modules/ims_auth/utils.c
+++ b/modules/ims_auth/utils.c
@@ -239,7 +239,7 @@ str ims_get_auts(struct sip_msg *msg, str realm, int is_proxy_auth)
 		return auts;
 	}
 
-	ret = find_credentials(msg, &realm, is_proxy_auth ? HDR_PROXYAUTH_F : HDR_AUTHORIZATION_F, &h);
+	ret = find_credentials(msg, &realm, is_proxy_auth ? HDR_PROXYAUTH_T : HDR_AUTHORIZATION_T, &h);
 	if (ret < 0) {
 		LM_ERR("Error while looking for credentials.\n");
 		return auts;
@@ -283,7 +283,7 @@ str ims_get_nonce(struct sip_msg *msg, str realm)
 		return nonce;
 	}
 
-	ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_F, &h);
+	ret = find_credentials(msg, &realm, HDR_AUTHORIZATION_T, &h);
 	if (ret < 0) {
 		LM_ERR("Error while looking for credentials.\n");
 		return nonce;




More information about the sr-dev mailing list