Module: kamailio
Branch: master
Commit: 12fca1c369b6698cace66de171dcb166be8ae831
URL:
https://github.com/kamailio/kamailio/commit/12fca1c369b6698cace66de171dcb16…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-05-04T14:09:27+02:00
tcpops: use fixup function from core, remove internal wrapper
- set also fixup free function in cmd exports
---
Modified: src/modules/tcpops/tcpops_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/12fca1c369b6698cace66de171dcb16…
Patch:
https://github.com/kamailio/kamailio/commit/12fca1c369b6698cace66de171dcb16…
---
diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c
index 82d9889355..b2d2fbe7dd 100644
--- a/src/modules/tcpops/tcpops_mod.c
+++ b/src/modules/tcpops/tcpops_mod.c
@@ -61,7 +61,6 @@ static int w_tcpops_enable_closed_event0(sip_msg_t* msg, char* p1, char*
p2);
static int w_tcp_conid_state(sip_msg_t* msg, char* con, char *p2);
static int w_tcp_conid_alive(sip_msg_t* msg, char* con, char *p2);
static int w_tcp_get_conid(sip_msg_t* msg, char *paddr, char *pvn);
-static int fixup_numpv(void** param, int param_no);
static int w_tcp_set_otcpid(sip_msg_t* msg, char* conid, char *p2);
static int w_tcp_set_otcpid_flag(sip_msg_t* msg, char* mode, char *p2);
@@ -79,27 +78,27 @@ static pv_export_t mod_pvs[] = {
static cmd_export_t cmds[]={
{"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable4, 4,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable3, 3,
- fixup_numpv, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE},
{"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable1, 1,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable0, 0,
0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
{"tcp_set_connection_lifetime",
(cmd_function)w_tcpops_set_connection_lifetime2, 2,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_set_connection_lifetime",
(cmd_function)w_tcpops_set_connection_lifetime1, 1,
- fixup_numpv, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE},
{"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event1, 1,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event0, 0,
0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
{"tcp_conid_state", (cmd_function)w_tcp_conid_state, 1,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_get_conid", (cmd_function)w_tcp_get_conid, 2,
fixup_spve_pvar, fixup_free_spve_pvar, ANY_ROUTE},
{"tcp_conid_alive", (cmd_function)w_tcp_conid_alive, 1,
- fixup_numpv, 0, ANY_ROUTE},
+ fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
{"tcp_set_otcpid", (cmd_function)w_tcp_set_otcpid, 1,
fixup_igp_all, fixup_free_igp_all, ANY_ROUTE},
{"tcp_set_otcpid_flag", (cmd_function)w_tcp_set_otcpid_flag, 1,
@@ -522,14 +521,6 @@ static int w_tcpops_enable_closed_event0(sip_msg_t* msg, char* p1,
char* p2)
return ki_tcpops_enable_closed_event(msg);
}
-/**
- *
- */
-static int fixup_numpv(void** param, int param_no)
-{
- return fixup_igp_null(param, 1);
-}
-
/**
*
*/