Bläddra i källkod

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

jaybeepee 10 år sedan
förälder
incheckning
61d531b25b
1 ändrade filer med 1 tillägg och 25 borttagningar
  1. 1 25
      modules/ims_auth/authims_mod.c

+ 1 - 25
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;
-}