[sr-dev] git:master:ad68b656: http_async_client: use directly the core fixup helper

Daniel-Constantin Mierla miconda at gmail.com
Wed Dec 6 10:17:43 CET 2017


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-05T16:54:21+01:00

http_async_client: use directly the core fixup helper

---

Modified: src/modules/http_async_client/http_async_client_mod.c

---

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

---

diff --git a/src/modules/http_async_client/http_async_client_mod.c b/src/modules/http_async_client/http_async_client_mod.c
index 42b68fcb71..26779bd64f 100644
--- a/src/modules/http_async_client/http_async_client_mod.c
+++ b/src/modules/http_async_client/http_async_client_mod.c
@@ -83,7 +83,6 @@ static void mod_destroy(void);
 
 static int w_http_async_query(sip_msg_t* msg, char* query, char* rt);
 static int set_query_param(str* param, str input);
-static int fixup_http_async_query(void** param, int param_no);
 
 /* pv api binding */
 static int ah_get_reason(struct sip_msg *msg, pv_param_t *param, pv_value_t *res);
@@ -125,7 +124,7 @@ enum http_req_name_t {
 };
 
 static cmd_export_t cmds[]={
-	{"http_async_query",  (cmd_function)w_http_async_query, 2, fixup_http_async_query,
+	{"http_async_query",  (cmd_function)w_http_async_query, 2, fixup_spve_spve,
 		0, ANY_ROUTE},
 	{0, 0, 0, 0, 0, 0}
 };
@@ -479,22 +478,6 @@ static int set_query_cparam(char** param, str input)
 	return 1;
 }
 
-/**
- *
- */
-static int fixup_http_async_query(void** param, int param_no)
-{
-	if (param_no == 1) {
-		return fixup_spve_null(param, 1);
-	}
-	if (param_no == 2) {
-		return fixup_var_str_12(param, param_no);
-	}
-
-	LM_ERR("invalid parameter number <%d>\n", param_no);
-	return -1;
-}
-
 /* module PVs */
 
 #define AH_WRAP_GET_PV(AH_F, PV_F) static int AH_F(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) \




More information about the sr-dev mailing list