[sr-dev] git:master:61d531b2: modules/ims_auth: fixed correct fixup for ims_proxy_challenge and removed old unused fixup

jaybeepee jason.penton at gmail.com
Mon Sep 21 12:36:17 CEST 2015


Module: kamailio
Branch: master
Commit: 61d531b25b1bee8d34ec7b5bed15660fd2ce3e5d
URL: https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660fd2ce3e5d

Author: jaybeepee <jason.penton at gmail.com>
Committer: jaybeepee <jason.penton at gmail.com>
Date: 2015-09-21T12:36:04+02:00

modules/ims_auth: fixed correct fixup for ims_proxy_challenge and removed old unused fixup

---

Modified: modules/ims_auth/authims_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660fd2ce3e5d.diff
Patch: https://github.com/kamailio/kamailio/commit/61d531b25b1bee8d34ec7b5bed15660fd2ce3e5d.patch

---

diff --git a/modules/ims_auth/authims_mod.c b/modules/ims_auth/authims_mod.c
index 0a2ff9d..e17ee6a 100644
--- a/modules/ims_auth/authims_mod.c
+++ b/modules/ims_auth/authims_mod.c
@@ -67,7 +67,6 @@ static void destroy(void);
 static int mod_init(void);
 
 static int auth_fixup(void** param, int param_no);
-static int auth_fixup_async(void** param, int param_no);
 static int challenge_fixup_async(void** param, int param_no);
 
 struct cdp_binds cdpb;
@@ -116,7 +115,7 @@ static cmd_export_t cmds[] = {
     {"ims_www_challenge", (cmd_function) www_challenge3, 3, challenge_fixup_async, 0, REQUEST_ROUTE},
     {"ims_www_resync_auth", (cmd_function) www_resync_auth, 2, challenge_fixup_async, 0, REQUEST_ROUTE},
     {"ims_proxy_authenticate", (cmd_function) proxy_authenticate, 1, auth_fixup, 0, REQUEST_ROUTE},
-    {"ims_proxy_challenge", (cmd_function) proxy_challenge, 2, auth_fixup_async, 0, REQUEST_ROUTE},
+    {"ims_proxy_challenge", (cmd_function) proxy_challenge, 3, challenge_fixup_async, 0, REQUEST_ROUTE},
     {"bind_ims_auth", (cmd_function) bind_ims_auth, 0, 0, 0, 0},
     {0, 0, 0, 0, 0, 0}
 };
@@ -295,26 +294,3 @@ static int auth_fixup(void** param, int param_no) {
 
     return 0;
 }
-
-/*
- * Convert the char* parameters
- */
-static int auth_fixup_async(void** param, int param_no) {
-    if (strlen((char*) *param) <= 0) {
-        LM_ERR("empty parameter %d not allowed\n", param_no);
-        return -1;
-    }
-
-    if (param_no == 1) {        //route name - static or dynamic string (config vars)
-        if (fixup_spve_null(param, param_no) < 0)
-            return -1;
-        return 0;
-    } else if (param_no == 2) {
-        if (fixup_var_str_12(param, 1) == -1) {
-            LM_ERR("Erroring doing fixup on auth");
-            return -1;
-        }
-    }
-
-    return 0;
-}




More information about the sr-dev mailing list