Browse code

tcpops: use fixup function from core, remove internal wrapper

- set also fixup free function in cmd exports

(cherry picked from commit 12fca1c369b6698cace66de171dcb166be8ae831)

Daniel-Constantin Mierla authored on 04/05/2021 11:30:21
Showing 1 changed files
... ...
@@ -61,7 +61,6 @@ static int w_tcpops_enable_closed_event0(sip_msg_t* msg, char* p1, char* p2);
61 61
 static int w_tcp_conid_state(sip_msg_t* msg, char* con, char *p2);
62 62
 static int w_tcp_conid_alive(sip_msg_t* msg, char* con, char *p2);
63 63
 static int w_tcp_get_conid(sip_msg_t* msg, char *paddr, char *pvn);
64
-static int fixup_numpv(void** param, int param_no);
65 64
 static int w_tcp_set_otcpid(sip_msg_t* msg, char* conid, char *p2);
66 65
 static int w_tcp_set_otcpid_flag(sip_msg_t* msg, char* mode, char *p2);
67 66
 
... ...
@@ -79,27 +78,27 @@ static pv_export_t mod_pvs[] = {
79 78
 
80 79
 static cmd_export_t cmds[]={
81 80
 	{"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable4, 4,
82
-			fixup_numpv, 0, ANY_ROUTE},
81
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
83 82
 	{"tcp_keepalive_enable", (cmd_function)w_tcp_keepalive_enable3, 3,
84
-			fixup_numpv, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
83
+			fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE},
85 84
 	{"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable1, 1,
86
-			fixup_numpv, 0, ANY_ROUTE},
85
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
87 86
 	{"tcp_keepalive_disable", (cmd_function)w_tcp_keepalive_disable0, 0,
88 87
 			0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
89 88
 	{"tcp_set_connection_lifetime", (cmd_function)w_tcpops_set_connection_lifetime2, 2,
90
-			fixup_numpv, 0, ANY_ROUTE},
89
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
91 90
 	{"tcp_set_connection_lifetime", (cmd_function)w_tcpops_set_connection_lifetime1, 1,
92
-			fixup_numpv, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
91
+			fixup_igp_null, fixup_free_igp_null, REQUEST_ROUTE|ONREPLY_ROUTE},
93 92
 	{"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event1, 1,
94
-			fixup_numpv, 0, ANY_ROUTE},
93
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
95 94
 	{"tcp_enable_closed_event", (cmd_function)w_tcpops_enable_closed_event0, 0,
96 95
 			0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},
97 96
 	{"tcp_conid_state", (cmd_function)w_tcp_conid_state, 1,
98
-			fixup_numpv, 0, ANY_ROUTE},
97
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
99 98
 	{"tcp_get_conid", (cmd_function)w_tcp_get_conid, 2,
100 99
 			fixup_spve_pvar, fixup_free_spve_pvar, ANY_ROUTE},
101 100
 	{"tcp_conid_alive", (cmd_function)w_tcp_conid_alive, 1,
102
-			fixup_numpv, 0, ANY_ROUTE},
101
+			fixup_igp_null, fixup_free_igp_null, ANY_ROUTE},
103 102
 	{"tcp_set_otcpid", (cmd_function)w_tcp_set_otcpid, 1,
104 103
 			fixup_igp_all, fixup_free_igp_all, ANY_ROUTE},
105 104
 	{"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)
522 521
 	return ki_tcpops_enable_closed_event(msg);
523 522
 }
524 523
 
525
-/**
526
- *
527
- */
528
-static int fixup_numpv(void** param, int param_no)
529
-{
530
-	return fixup_igp_null(param, 1);
531
-}
532
-
533 524
 /**
534 525
  *
535 526
  */