Browse code

- add missing cast for cmd_function after module interface extension

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3441 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 19/12/2007 12:23:10
Showing 41 changed files
... ...
@@ -163,18 +163,18 @@ static int free_acc_fixup(void** param, int param_no);
163 163
 
164 164
 
165 165
 static cmd_export_t cmds[] = {
166
-	{"acc_log_request", w_acc_log_request, 1, acc_fixup, free_acc_fixup,
166
+	{"acc_log_request", (cmd_function)w_acc_log_request, 1, acc_fixup, free_acc_fixup,
167 167
 			REQUEST_ROUTE|FAILURE_ROUTE},
168 168
 #ifdef SQL_ACC
169
-	{"acc_db_request",  w_acc_db_request,  2, acc_fixup, free_acc_fixup,
169
+	{"acc_db_request",  (cmd_function)w_acc_db_request,  2, acc_fixup, free_acc_fixup,
170 170
 			REQUEST_ROUTE|FAILURE_ROUTE},
171 171
 #endif
172 172
 #ifdef RAD_ACC
173
-	{"acc_rad_request", w_acc_rad_request, 1, acc_fixup, free_acc_fixup,
173
+	{"acc_rad_request", (cmd_function)w_acc_rad_request, 1, acc_fixup, free_acc_fixup,
174 174
 			REQUEST_ROUTE|FAILURE_ROUTE},
175 175
 #endif
176 176
 #ifdef DIAM_ACC
177
-	{"acc_diam_request",w_acc_diam_request,1, acc_fixup, free_acc_fixup,
177
+	{"acc_diam_request",(cmd_function)w_acc_diam_request,1, acc_fixup, free_acc_fixup,
178 178
 			REQUEST_ROUTE|FAILURE_ROUTE},
179 179
 #endif
180 180
 	{0, 0, 0, 0, 0, 0}
... ...
@@ -69,7 +69,7 @@ db_func_t adbf;  /* DB functions */
69 69
 
70 70
 /* Exported functions */
71 71
 static cmd_export_t cmds[] = {
72
-	{"alias_db_lookup", alias_db_lookup, 1, 0, 0,
72
+	{"alias_db_lookup", (cmd_function)alias_db_lookup, 1, 0, 0,
73 73
 		REQUEST_ROUTE|FAILURE_ROUTE},
74 74
 	{0, 0, 0, 0, 0, 0}
75 75
 };
... ...
@@ -122,21 +122,21 @@ static pv_spec_t passwd_spec;
122 122
  * Exported functions 
123 123
  */
124 124
 static cmd_export_t cmds[] = {
125
-	{"www_challenge",       www_challenge,           2, challenge_fixup,
125
+	{"www_challenge",       (cmd_function)www_challenge,           2, challenge_fixup,
126 126
 			0, REQUEST_ROUTE},
127
-	{"proxy_challenge",     proxy_challenge,         2, challenge_fixup,
127
+	{"proxy_challenge",     (cmd_function)proxy_challenge,         2, challenge_fixup,
128 128
 			0, REQUEST_ROUTE},
129
-	{"pv_www_authorize",    pv_www_authorize,        1, auth_fixup,
129
+	{"pv_www_authorize",    (cmd_function)pv_www_authorize,        1, auth_fixup,
130 130
 			0, REQUEST_ROUTE},
131
-	{"pv_proxy_authorize",  pv_proxy_authorize,      1, auth_fixup,
131
+	{"pv_proxy_authorize",  (cmd_function)pv_proxy_authorize,      1, auth_fixup,
132 132
 			0, REQUEST_ROUTE},
133
-	{"consume_credentials", consume_credentials,     0, 0,
133
+	{"consume_credentials", (cmd_function)consume_credentials,     0, 0,
134 134
 			0, REQUEST_ROUTE},
135
-	{"is_rpid_user_e164",   is_rpid_user_e164,       0, 0,
135
+	{"is_rpid_user_e164",   (cmd_function)is_rpid_user_e164,       0, 0,
136 136
 			0, REQUEST_ROUTE},
137
-	{"append_rpid_hf",      append_rpid_hf,          0, 0,
137
+	{"append_rpid_hf",      (cmd_function)append_rpid_hf,          0, 0,
138 138
 			0, REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
139
-	{"append_rpid_hf",      append_rpid_hf_p,        2, rpid_fixup,
139
+	{"append_rpid_hf",      (cmd_function)append_rpid_hf_p,        2, rpid_fixup,
140 140
 			0, REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
141 141
 	{"bind_auth",           (cmd_function)bind_auth, 0, 0,
142 142
 			0, 0},
... ...
@@ -113,8 +113,8 @@ int credentials_n           = 0; /* Number of credentials in the list */
113 113
  * Exported functions
114 114
  */
115 115
 static cmd_export_t cmds[] = {
116
-	{"www_authorize",   www_authorize,   2, auth_fixup, 0, REQUEST_ROUTE},
117
-	{"proxy_authorize", proxy_authorize, 2, auth_fixup, 0, REQUEST_ROUTE},
116
+	{"www_authorize",   (cmd_function)www_authorize,   2, auth_fixup, 0, REQUEST_ROUTE},
117
+	{"proxy_authorize", (cmd_function)proxy_authorize, 2, auth_fixup, 0, REQUEST_ROUTE},
118 118
 	{0, 0, 0, 0, 0, 0}
119 119
 };
120 120
 
... ...
@@ -76,11 +76,11 @@ rd_buf_t *rb;
76 76
  * Exported functions
77 77
  */
78 78
 static cmd_export_t cmds[] = {
79
-	{"diameter_www_authorize",   diameter_www_authorize,   1, auth_fixup,
79
+	{"diameter_www_authorize",   (cmd_function)diameter_www_authorize,   1, auth_fixup,
80 80
 			0, REQUEST_ROUTE},
81
-	{"diameter_proxy_authorize", diameter_proxy_authorize, 1, auth_fixup,
81
+	{"diameter_proxy_authorize", (cmd_function)diameter_proxy_authorize, 1, auth_fixup,
82 82
 			0, REQUEST_ROUTE},
83
-	{"diameter_is_user_in",      diameter_is_user_in,      2, group_fixup,
83
+	{"diameter_is_user_in",      (cmd_function)diameter_is_user_in,      2, group_fixup,
84 84
 			0, REQUEST_ROUTE},
85 85
 	{0, 0, 0, 0, 0, 0}
86 86
 };
... ...
@@ -91,31 +91,31 @@ static int w_is_avp_set(struct sip_msg* msg, char* param, char *foo);
91 91
  * Exported functions
92 92
  */
93 93
 static cmd_export_t cmds[] = {
94
-	{"avp_print",  w_print_avps, 0, 0, 0,
94
+	{"avp_print", (cmd_function)w_print_avps, 0, 0, 0,
95 95
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
96
-	{"avp_db_load",   w_dbload_avps,  2, fixup_db_load_avp, 0,
96
+	{"avp_db_load", (cmd_function)w_dbload_avps,  2, fixup_db_load_avp, 0,
97 97
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
98
-	{"avp_db_delete", w_dbdelete_avps, 2, fixup_db_delete_avp, 0,
98
+	{"avp_db_delete", (cmd_function)w_dbdelete_avps, 2, fixup_db_delete_avp, 0,
99 99
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
100
-	{"avp_db_store",  w_dbstore_avps,  2, fixup_db_store_avp, 0,
100
+	{"avp_db_store", (cmd_function)w_dbstore_avps,  2, fixup_db_store_avp, 0,
101 101
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
102
-	{"avp_db_query",  w_dbquery1_avps, 1, fixup_db_query_avp, 0,
102
+	{"avp_db_query", (cmd_function)w_dbquery1_avps, 1, fixup_db_query_avp, 0,
103 103
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
104
-	{"avp_db_query",  w_dbquery2_avps, 2, fixup_db_query_avp, 0,
104
+	{"avp_db_query", (cmd_function)w_dbquery2_avps, 2, fixup_db_query_avp, 0,
105 105
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
106
-	{"avp_delete", w_delete_avps, 1, fixup_delete_avp, 0,
106
+	{"avp_delete", (cmd_function)w_delete_avps, 1, fixup_delete_avp, 0,
107 107
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
108
-	{"avp_copy",   w_copy_avps,  2,  fixup_copy_avp, 0,
108
+	{"avp_copy",   (cmd_function)w_copy_avps,  2,  fixup_copy_avp, 0,
109 109
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
110
-	{"avp_pushto", w_pushto_avps, 2, fixup_pushto_avp, 0,
110
+	{"avp_pushto", (cmd_function)w_pushto_avps, 2, fixup_pushto_avp, 0,
111 111
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
112
-	{"avp_check",  w_check_avps, 2, fixup_check_avp, 0,
112
+	{"avp_check",  (cmd_function)w_check_avps, 2, fixup_check_avp, 0,
113 113
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
114
-	{"avp_op",     w_op_avps, 2, fixup_op_avp, 0,
114
+	{"avp_op",     (cmd_function)w_op_avps, 2, fixup_op_avp, 0,
115 115
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
116
-	{"avp_subst",  w_subst,   2, fixup_subst, 0,
116
+	{"avp_subst",  (cmd_function)w_subst,   2, fixup_subst, 0,
117 117
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
118
-	{"is_avp_set", w_is_avp_set, 1, fixup_is_avp_set, 0,
118
+	{"is_avp_set", (cmd_function)w_is_avp_set, 1, fixup_is_avp_set, 0,
119 119
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
120 120
 	{0, 0, 0, 0, 0, 0}
121 121
 };
... ...
@@ -99,11 +99,11 @@ static inline int fixup_bm_timer(void** param, int param_no);
99 99
  * Exported functions
100 100
  */
101 101
 static cmd_export_t cmds[] = {
102
-	{ "bm_start_timer", bm_start_timer, 1, fixup_bm_timer, 0,
102
+	{ "bm_start_timer", (cmd_function)bm_start_timer, 1, fixup_bm_timer, 0,
103 103
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
104
-	{ "bm_log_timer",   bm_log_timer, 1, fixup_bm_timer, 0,
104
+	{ "bm_log_timer",   (cmd_function)bm_log_timer, 1, fixup_bm_timer, 0,
105 105
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
106
-	{"load_bm", (cmd_function)load_bm, 0, 0, 0, 0},
106
+	{"load_bm",         (cmd_function)load_bm, 0, 0, 0, 0},
107 107
 	{ 0, 0, 0, 0, 0, 0 }
108 108
 };
109 109
 
... ...
@@ -105,14 +105,14 @@ static enum hash_source hash_fixup(const char * domain);
105 105
 
106 106
 /************* Module Exports **********************************************/
107 107
 static cmd_export_t cmds[]={
108
-	{"cr_rewrite_uri",           route_uri,             2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
109
-	{"cr_prime_balance_uri",     prime_balance_uri,     2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
110
-	{"cr_rewrite_by_to",         route_by_to,           2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
111
-	{"cr_prime_balance_by_to",   prime_balance_by_to,   2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
112
-	{"cr_rewrite_by_from",       route_by_from,         2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
113
-	{"cr_prime_balance_by_from", prime_balance_by_from, 2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
114
-	{"cr_user_rewrite_uri",      user_route_uri,        2, user_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
115
-	{"cr_tree_rewrite_uri",      tree_route_uri,        2, tree_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
108
+	{"cr_rewrite_uri",           (cmd_function)route_uri,             2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
109
+	{"cr_prime_balance_uri",     (cmd_function)prime_balance_uri,     2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
110
+	{"cr_rewrite_by_to",         (cmd_function)route_by_to,           2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
111
+	{"cr_prime_balance_by_to",   (cmd_function)prime_balance_by_to,   2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
112
+	{"cr_rewrite_by_from",       (cmd_function)route_by_from,         2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
113
+	{"cr_prime_balance_by_from", (cmd_function)prime_balance_by_from, 2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
114
+	{"cr_user_rewrite_uri",      (cmd_function)user_route_uri,        2, user_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
115
+	{"cr_tree_rewrite_uri",      (cmd_function)tree_route_uri,        2, tree_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
116 116
 	{0, 0, 0, 0, 0, 0}
117 117
 };
118 118
 
... ...
@@ -81,20 +81,20 @@ static int *probability;
81 81
 
82 82
 static cmd_export_t cmds[]={
83 83
 	{"rand_set_prob", /* action name as in scripts */
84
-		set_prob,  /* C function name */
84
+		(cmd_function)set_prob,  /* C function name */
85 85
 		1,          /* number of parameters */
86 86
 		fixup_prob, 0,         /* */
87 87
 		/* can be applied to original/failed requests and replies */
88 88
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE}, 
89
-	{"rand_reset_prob", reset_prob, 0, 0, 0,
89
+	{"rand_reset_prob", (cmd_function)reset_prob, 0, 0, 0,
90 90
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE}, 
91
-	{"rand_get_prob", get_prob, 0, 0, 0,
91
+	{"rand_get_prob", (cmd_function)get_prob, 0, 0, 0,
92 92
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
93
-	{"rand_event", rand_event, 0, 0, 0,
93
+	{"rand_event", (cmd_function)rand_event, 0, 0, 0,
94 94
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
95
-	{"sleep",    m_sleep,    1,      fixup_str2int, 0, 
95
+	{"sleep",    (cmd_function)m_sleep,    1,      fixup_str2int, 0, 
96 96
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
97
-	{"usleep",   m_usleep,   1,      fixup_str2int, 0,
97
+	{"usleep",   (cmd_function)m_usleep,   1,      fixup_str2int, 0,
98 98
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
99 99
 	{0, 0, 0, 0, 0, 0}
100 100
 };
... ...
@@ -111,14 +111,14 @@ struct mi_root* ds_mi_reload(struct mi_root* cmd_tree, void* param);
111 111
 static int mi_child_init(void);
112 112
 
113 113
 static cmd_export_t cmds[]={
114
-	{"ds_select_dst",    w_ds_select_dst,    2, ds_fixup, 0, REQUEST_ROUTE},
115
-	{"ds_select_domain", w_ds_select_domain, 2, ds_fixup, 0, REQUEST_ROUTE},
116
-	{"ds_next_dst",      w_ds_next_dst,      0, ds_warn_fixup, 0, FAILURE_ROUTE},
117
-	{"ds_next_domain",   w_ds_next_domain,   0, ds_warn_fixup, 0, FAILURE_ROUTE},
118
-	{"ds_mark_dst",      w_ds_mark_dst0,     0, ds_warn_fixup, 0, FAILURE_ROUTE},
119
-	{"ds_mark_dst",      w_ds_mark_dst1,     1, ds_warn_fixup, 0, FAILURE_ROUTE},
120
-	{"ds_is_from_list",  w_ds_is_from_list0, 0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
121
-	{"ds_is_from_list",  w_ds_is_from_list1, 1, fixup_str2int, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
114
+	{"ds_select_dst",    (cmd_function)w_ds_select_dst,    2, ds_fixup, 0, REQUEST_ROUTE},
115
+	{"ds_select_domain", (cmd_function)w_ds_select_domain, 2, ds_fixup, 0, REQUEST_ROUTE},
116
+	{"ds_next_dst",      (cmd_function)w_ds_next_dst,      0, ds_warn_fixup, 0, FAILURE_ROUTE},
117
+	{"ds_next_domain",   (cmd_function)w_ds_next_domain,   0, ds_warn_fixup, 0, FAILURE_ROUTE},
118
+	{"ds_mark_dst",      (cmd_function)w_ds_mark_dst0,     0, ds_warn_fixup, 0, FAILURE_ROUTE},
119
+	{"ds_mark_dst",      (cmd_function)w_ds_mark_dst1,     1, ds_warn_fixup, 0, FAILURE_ROUTE},
120
+	{"ds_is_from_list",  (cmd_function)w_ds_is_from_list0, 0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
121
+	{"ds_is_from_list",  (cmd_function)w_ds_is_from_list1, 1, fixup_str2int, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
122 122
 	{0,0,0,0,0,0}
123 123
 };
124 124
 
... ...
@@ -60,7 +60,7 @@ static int mod_init(void);
60 60
  * Exported functions
61 61
  */
62 62
 static cmd_export_t cmds[] = {
63
-	{"add_diversion",    add_diversion,    1, str_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE},
63
+	{"add_diversion",    (cmd_function)add_diversion,    1, str_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE},
64 64
 	{0, 0, 0, 0, 0, 0}
65 65
 };
66 66
 
... ...
@@ -88,11 +88,11 @@ struct domain_list **hash_table_2 = 0;	/* Pointer to hash table 2 */
88 88
  * Exported functions
89 89
  */
90 90
 static cmd_export_t cmds[] = {
91
-	{"is_from_local",       is_from_local,       0,  0, 0,
91
+	{"is_from_local",       (cmd_function)is_from_local,       0,  0, 0,
92 92
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
93
-	{"is_uri_host_local",   is_uri_host_local,   0,  0, 0,
93
+	{"is_uri_host_local",   (cmd_function)is_uri_host_local,   0,  0, 0,
94 94
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
95
-	{"is_domain_local",     w_is_domain_local,   1,  parameter_fixup, 0,
95
+	{"is_domain_local",     (cmd_function)w_is_domain_local,   1,  parameter_fixup, 0,
96 96
 			REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
97 97
 	{0, 0, 0, 0, 0, 0}
98 98
 };
... ...
@@ -104,8 +104,8 @@ unsigned short send_socket_avp_name_str;
104 104
  * Exported functions
105 105
  */
106 106
 static cmd_export_t cmds[] = {
107
-	{"dp_can_connect",  dp_can_connect,  0, 0, 0, REQUEST_ROUTE},
108
-	{"dp_apply_policy", dp_apply_policy, 0, 0, 0, REQUEST_ROUTE},
107
+	{"dp_can_connect",  (cmd_function)dp_can_connect,  0, 0, 0, REQUEST_ROUTE},
108
+	{"dp_apply_policy", (cmd_function)dp_apply_policy, 0, 0, 0, REQUEST_ROUTE},
109 109
 	{0, 0, 0, 0, 0, 0}
110 110
 };
111 111
 
... ...
@@ -78,18 +78,18 @@ str i_bl_alg;
78 78
  * Exported functions
79 79
  */
80 80
 static cmd_export_t cmds[] = {
81
-	{"enum_query",        enum_query_0,     0, 0,            0, REQUEST_ROUTE},
82
-	{"enum_query",        enum_query_1,     1, str_fixup,    0, REQUEST_ROUTE},
83
-	{"enum_query",        enum_query_2,     2, enum_fixup,   0, REQUEST_ROUTE},
84
-	{"enum_fquery",       enum_fquery_0,    0, 0,            0, REQUEST_ROUTE},
85
-	{"enum_fquery",       enum_fquery_1,    1, str_fixup,    0, REQUEST_ROUTE},
86
-	{"enum_fquery",       enum_fquery_2,    2, enum_fixup,   0, REQUEST_ROUTE},
87
-	{"is_from_user_enum", is_from_user_enum_0, 0, 0,         0, REQUEST_ROUTE},
88
-	{"is_from_user_enum", is_from_user_enum_1, 1, str_fixup, 0, REQUEST_ROUTE},
89
-	{"is_from_user_enum", is_from_user_enum_2, 2, enum_fixup,0, REQUEST_ROUTE},
90
-	{"i_enum_query",      i_enum_query_0,   0, 0,            0, REQUEST_ROUTE},
91
-	{"i_enum_query",      i_enum_query_1,   1, str_fixup,    0, REQUEST_ROUTE},
92
-	{"i_enum_query",      i_enum_query_2,   2, enum_fixup,   0, REQUEST_ROUTE},
81
+	{"enum_query",        (cmd_function)enum_query_0,     0, 0,            0, REQUEST_ROUTE},
82
+	{"enum_query",        (cmd_function)enum_query_1,     1, str_fixup,    0, REQUEST_ROUTE},
83
+	{"enum_query",        (cmd_function)enum_query_2,     2, enum_fixup,   0, REQUEST_ROUTE},
84
+	{"enum_fquery",       (cmd_function)enum_fquery_0,    0, 0,            0, REQUEST_ROUTE},
85
+	{"enum_fquery",       (cmd_function)enum_fquery_1,    1, str_fixup,    0, REQUEST_ROUTE},
86
+	{"enum_fquery",       (cmd_function)enum_fquery_2,    2, enum_fixup,   0, REQUEST_ROUTE},
87
+	{"is_from_user_enum", (cmd_function)is_from_user_enum_0, 0, 0,         0, REQUEST_ROUTE},
88
+	{"is_from_user_enum", (cmd_function)is_from_user_enum_1, 1, str_fixup, 0, REQUEST_ROUTE},
89
+	{"is_from_user_enum", (cmd_function)is_from_user_enum_2, 2, enum_fixup,0, REQUEST_ROUTE},
90
+	{"i_enum_query",      (cmd_function)i_enum_query_0,   0, 0,            0, REQUEST_ROUTE},
91
+	{"i_enum_query",      (cmd_function)i_enum_query_1,   1, str_fixup,    0, REQUEST_ROUTE},
92
+	{"i_enum_query",      (cmd_function)i_enum_query_2,   2, enum_fixup,   0, REQUEST_ROUTE},
93 93
 	{0, 0, 0, 0, 0, 0}
94 94
 };
95 95
 
... ...
@@ -60,10 +60,10 @@ inline static void exec_shutdown(void);
60 60
  * Exported functions
61 61
  */
62 62
 static cmd_export_t cmds[] = {
63
-	{"exec_dset", w_exec_dset, 1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
64
-	{"exec_msg",  w_exec_msg,  1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
65
-	{"exec_avp",  w_exec_avp,  1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
66
-	{"exec_avp",  w_exec_avp,  2, exec_avp_fixup, 0, REQUEST_ROUTE|FAILURE_ROUTE},
63
+	{"exec_dset", (cmd_function)w_exec_dset, 1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
64
+	{"exec_msg",  (cmd_function)w_exec_msg,  1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
65
+	{"exec_avp",  (cmd_function)w_exec_avp,  1, it_list_fixup,  0, REQUEST_ROUTE|FAILURE_ROUTE},
66
+	{"exec_avp",  (cmd_function)w_exec_avp,  2, exec_avp_fixup, 0, REQUEST_ROUTE|FAILURE_ROUTE},
67 67
 	{0, 0, 0, 0, 0, 0}
68 68
 };
69 69
 
... ...
@@ -81,11 +81,11 @@ static int initial=0;
81 81
 static unsigned int *gflags=0;
82 82
 
83 83
 static cmd_export_t cmds[]={
84
-	{"set_gflag",    set_gflag,   1,   fixup_gflags, 0,
84
+	{"set_gflag",    (cmd_function)set_gflag,   1,   fixup_gflags, 0,
85 85
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
86
-	{"reset_gflag",  reset_gflag, 1,   fixup_gflags, 0,
86
+	{"reset_gflag",  (cmd_function)reset_gflag, 1,   fixup_gflags, 0,
87 87
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
88
-	{"is_gflag",     is_gflag,    1,   fixup_gflags, 0,
88
+	{"is_gflag",     (cmd_function)is_gflag,    1,   fixup_gflags, 0,
89 89
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
90 90
 	{0, 0, 0, 0, 0, 0}
91 91
 };
... ...
@@ -123,9 +123,9 @@ db_con_t* group_dbh = 0;
123 123
  * Exported functions
124 124
  */
125 125
 static cmd_export_t cmds[] = {
126
-	{"is_user_in",      is_user_in,      2,  hf_fixup, 0,
126
+	{"is_user_in",      (cmd_function)is_user_in,      2,  hf_fixup, 0,
127 127
 			REQUEST_ROUTE|FAILURE_ROUTE},
128
-	{"get_user_group",  get_user_group,  2,  get_gid_fixup, 0,
128
+	{"get_user_group",  (cmd_function)get_user_group,  2,  get_gid_fixup, 0,
129 129
 			REQUEST_ROUTE|FAILURE_ROUTE},
130 130
 	{0, 0, 0, 0, 0, 0}
131 131
 };
... ...
@@ -90,7 +90,7 @@ struct tm_binds tmb;
90 90
 void inv_callback( struct cell *t, int type, struct tmcb_params *ps);
91 91
 
92 92
 static cmd_export_t cmds[]={
93
-	{"imc_manager",  imc_manager, 0, 0, 0, REQUEST_ROUTE},
93
+	{"imc_manager",  (cmd_function)imc_manager, 0, 0, 0, REQUEST_ROUTE},
94 94
 	{0,0,0,0,0,0}
95 95
 };
96 96
 
... ...
@@ -260,25 +260,25 @@ static int pvar_fixup(void** param, int param_no);
260 260
  * Exported functions
261 261
  */
262 262
 static cmd_export_t cmds[] = {
263
-	{"load_gws",      load_gws,      0, 0, 0,
263
+	{"load_gws",      (cmd_function)load_gws,      0, 0, 0,
264 264
 		REQUEST_ROUTE | FAILURE_ROUTE},
265
-	{"load_gws",      load_gws_grp,  1, fixstringloadgws, 0,
265
+	{"load_gws",      (cmd_function)load_gws_grp,  1, fixstringloadgws, 0,
266 266
 		REQUEST_ROUTE | FAILURE_ROUTE},
267
-	{"next_gw",       next_gw,       0, 0, 0,
267
+	{"next_gw",       (cmd_function)next_gw,       0, 0, 0,
268 268
 		REQUEST_ROUTE | FAILURE_ROUTE},
269
-	{"from_gw",       from_gw_0,       0, 0, 0,
269
+	{"from_gw",       (cmd_function)from_gw_0,       0, 0, 0,
270 270
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
271
-	{"from_gw",       from_gw_1,       1, pvar_fixup, 0,
271
+	{"from_gw",       (cmd_function)from_gw_1,       1, pvar_fixup, 0,
272 272
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
273
-	{"from_gw_grp",       from_gw_grp,   1, fixup_str2int, 0,
273
+	{"from_gw_grp",   (cmd_function)from_gw_grp,   1, fixup_str2int, 0,
274 274
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
275
-	{"to_gw",         to_gw,         0, 0, 0,
275
+	{"to_gw",         (cmd_function)to_gw,         0, 0, 0,
276 276
 		REQUEST_ROUTE | FAILURE_ROUTE},
277
-	{"to_gw",         to_gw_grp,     1, fixup_str2int, 0,
277
+	{"to_gw",         (cmd_function)to_gw_grp,     1, fixup_str2int, 0,
278 278
 		REQUEST_ROUTE | FAILURE_ROUTE},
279
-	{"load_contacts", load_contacts, 0, 0, 0,
279
+	{"load_contacts", (cmd_function)load_contacts, 0, 0, 0,
280 280
 		REQUEST_ROUTE},
281
-	{"next_contacts", next_contacts, 0, 0, 0,
281
+	{"next_contacts", (cmd_function)next_contacts, 0, 0, 0,
282 282
 		REQUEST_ROUTE | FAILURE_ROUTE},
283 283
 	{0, 0, 0, 0, 0, 0}
284 284
 };
... ...
@@ -94,11 +94,11 @@ static param_export_t params[] = {
94 94
  */
95 95
 static cmd_export_t cmds[] = 
96 96
 {
97
-	{"sdp_mangle_ip", sdp_mangle_ip, 2,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE}, // fixup_char2str?
98
-	{"sdp_mangle_port",sdp_mangle_port, 1,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},// fixup_char2int if I use an int as offset
99
-	{"encode_contact",encode_contact,2,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},//fixup_char2str
100
-	{"decode_contact",decode_contact,0,0, 0, REQUEST_ROUTE},
101
-	{"decode_contact_header",decode_contact_header,0,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},
97
+	{"sdp_mangle_ip",   (cmd_function)sdp_mangle_ip, 2,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE}, // fixup_char2str?
98
+	{"sdp_mangle_port", (cmd_function)sdp_mangle_port, 1,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},// fixup_char2int if I use an int as offset
99
+	{"encode_contact",  (cmd_function)encode_contact,2,0, 0, REQUEST_ROUTE|ONREPLY_ROUTE},//fixup_char2str
100
+	{"decode_contact",  (cmd_function)decode_contact,0,0, 0, REQUEST_ROUTE},
101
+	{"decode_contact_header", (cmd_function)decode_contact_header,0,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},
102 102
 	{0, 0, 0, 0, 0, 0}
103 103
 };
104 104
 
... ...
@@ -58,9 +58,9 @@ static int is_maxfwd_lt(struct sip_msg *msg, char *slimit, char *foo);
58 58
 static int mod_init(void);
59 59
 
60 60
 static cmd_export_t cmds[]={
61
-	{"mf_process_maxfwd_header", w_process_maxfwd_header, 1,
61
+	{"mf_process_maxfwd_header", (cmd_function)w_process_maxfwd_header, 1,
62 62
 		fixup_maxfwd_header, 0, REQUEST_ROUTE},
63
-	{"is_maxfwd_lt", is_maxfwd_lt, 1,
63
+	{"is_maxfwd_lt", (cmd_function)is_maxfwd_lt, 1,
64 64
 		fixup_maxfwd_header, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
65 65
 	{0,0,0,0,0,0}
66 66
 };
... ...
@@ -198,10 +198,10 @@ NatTest natTests[] = {
198 198
 };
199 199
 
200 200
 static cmd_export_t commands[] = {
201
-    {"fix_contact",       FixContact,      0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
202
-    {"use_media_proxy",   UseMediaProxy,   0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
203
-    {"end_media_session", EndMediaSession, 0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
204
-    {"client_nat_test",   ClientNatTest,   1, fixup_str2int, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
201
+    {"fix_contact",       (cmd_function)FixContact,      0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
202
+    {"use_media_proxy",   (cmd_function)UseMediaProxy,   0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
203
+    {"end_media_session", (cmd_function)EndMediaSession, 0, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
204
+    {"client_nat_test",   (cmd_function)ClientNatTest,   1, fixup_str2int, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
205 205
     {0, 0, 0, 0, 0, 0}
206 206
 };
207 207
 
... ...
@@ -176,10 +176,10 @@ int check_message_support(struct sip_msg* msg);
176 176
 static void m_tm_callback( struct cell *t, int type, struct tmcb_params *ps);
177 177
 
178 178
 static cmd_export_t cmds[]={
179
-	{"m_store",  m_store, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE},
180
-	{"m_store",  m_store, 1, fixup_msilo, 0, REQUEST_ROUTE | FAILURE_ROUTE},
181
-	{"m_dump",   m_dump,  0, 0, 0, REQUEST_ROUTE},
182
-	{"m_dump",   m_dump,  1, fixup_msilo, 0, REQUEST_ROUTE},
179
+	{"m_store",  (cmd_function)m_store, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE},
180
+	{"m_store",  (cmd_function)m_store, 1, fixup_msilo, 0, REQUEST_ROUTE | FAILURE_ROUTE},
181
+	{"m_dump",   (cmd_function)m_dump,  0, 0, 0, REQUEST_ROUTE},
182
+	{"m_dump",   (cmd_function)m_dump,  1, fixup_msilo, 0, REQUEST_ROUTE},
183 183
 	{0,0,0,0,0,0}
184 184
 };
185 185
 
... ...
@@ -383,31 +383,31 @@ static int *rtpp_socks = 0;
383 383
 unsigned int *natping_state=0;
384 384
 
385 385
 static cmd_export_t cmds[] = {
386
-	{"fix_nated_contact",  fix_nated_contact_f,    0, 0, 0,
386
+	{"fix_nated_contact",  (cmd_function)fix_nated_contact_f,    0, 0, 0,
387 387
 			REQUEST_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE},
388
-	{"fix_nated_sdp",      fix_nated_sdp_f,        1, fixup_fix_sdp, 0,
388
+	{"fix_nated_sdp",      (cmd_function)fix_nated_sdp_f,        1, fixup_fix_sdp, 0,
389 389
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
390
-	{"fix_nated_sdp",      fix_nated_sdp_f,        2, fixup_fix_sdp, 0,
390
+	{"fix_nated_sdp",      (cmd_function)fix_nated_sdp_f,        2, fixup_fix_sdp, 0,
391 391
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
392
-	{"set_rtp_proxy_set",  set_rtp_proxy_set_f,    1, fixup_set_id, 0,
392
+	{"set_rtp_proxy_set",  (cmd_function)set_rtp_proxy_set_f,    1, fixup_set_id, 0,
393 393
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
394
-	{"unforce_rtp_proxy",  unforce_rtp_proxy_f,    0, 0, 0,
394
+	{"unforce_rtp_proxy",  (cmd_function)unforce_rtp_proxy_f,    0, 0, 0,
395 395
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
396
-	{"force_rtp_proxy",    force_rtp_proxy0_f,     0, 0, 0,
396
+	{"force_rtp_proxy",    (cmd_function)force_rtp_proxy0_f,     0, 0, 0,
397 397
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
398
-	{"force_rtp_proxy",    force_rtp_proxy1_f,     1, 0, 0,
398
+	{"force_rtp_proxy",    (cmd_function)force_rtp_proxy1_f,     1, 0, 0,
399 399
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
400
-	{"force_rtp_proxy",    force_rtp_proxy2_f,     2, 0, 0,
400
+	{"force_rtp_proxy",    (cmd_function)force_rtp_proxy2_f,     2, 0, 0,
401 401
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
402
-	{"nat_uac_test",       nat_uac_test_f,         1, fixup_str2int, 0,
402
+	{"nat_uac_test",       (cmd_function)nat_uac_test_f,         1, fixup_str2int, 0,
403 403
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
404
-	{"fix_nated_register", fix_nated_register_f,   0, fixup_fix_nated_register, 0,
404
+	{"fix_nated_register", (cmd_function)fix_nated_register_f,   0, fixup_fix_nated_register, 0,
405 405
 			REQUEST_ROUTE },
406
-	{"add_rcv_param",      add_rcv_param_f,        0, 0, 0,
406
+	{"add_rcv_param",      (cmd_function)add_rcv_param_f,        0, 0, 0,
407 407
 			REQUEST_ROUTE },
408
-	{"add_rcv_param",      add_rcv_param_f,        1, fixup_str2int, 0,
408
+	{"add_rcv_param",      (cmd_function)add_rcv_param_f,        1, fixup_str2int, 0,
409 409
 			REQUEST_ROUTE },
410
-	{"start_recording",    start_recording_f,      0, 0, 0,
410
+	{"start_recording",    (cmd_function)start_recording_f,      0, 0, 0,
411 411
 			REQUEST_ROUTE | ONREPLY_ROUTE },
412 412
 	{0, 0, 0, 0, 0, 0}
413 413
 };
... ...
@@ -68,10 +68,10 @@ struct rr_binds path_rrb;
68 68
  * Exported functions
69 69
  */
70 70
 static cmd_export_t cmds[] = {
71
-	{ "add_path",          add_path,              0,  0,         0, REQUEST_ROUTE },
72
-	{ "add_path",          add_path_usr,          1,  str_fixup, 0, REQUEST_ROUTE },
73
-	{ "add_path_received", add_path_received,     0,  0,         0, REQUEST_ROUTE },
74
-	{ "add_path_received", add_path_received_usr, 1,  str_fixup, 0, REQUEST_ROUTE },
71
+	{ "add_path",          (cmd_function)add_path,              0,  0,         0, REQUEST_ROUTE },
72
+	{ "add_path",          (cmd_function)add_path_usr,          1,  str_fixup, 0, REQUEST_ROUTE },
73
+	{ "add_path_received", (cmd_function)add_path_received,     0,  0,         0, REQUEST_ROUTE },
74
+	{ "add_path_received", (cmd_function)add_path_received_usr, 1,  str_fixup, 0, REQUEST_ROUTE },
75 75
 	{ 0, 0, 0, 0, 0, 0 }
76 76
 };
77 77
 
... ...
@@ -107,9 +107,9 @@ int update_new_uri(struct sip_msg *msg, int plen, str *d, int mode);
107 107
 int pdt_load_db();
108 108
 
109 109
 static cmd_export_t cmds[]={
110
-	{"prefix2domain", w_prefix2domain,   0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
111
-	{"prefix2domain", w_prefix2domain_1, 1, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
112
-	{"prefix2domain", w_prefix2domain_2, 2, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
110
+	{"prefix2domain", (cmd_function)w_prefix2domain,   0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
111
+	{"prefix2domain", (cmd_function)w_prefix2domain_1, 1, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
112
+	{"prefix2domain", (cmd_function)w_prefix2domain_2, 2, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE},
113 113
 	{0, 0, 0, 0, 0, 0}
114 114
 };
115 115
 
... ...
@@ -127,27 +127,27 @@ static int mi_addr_child_init();
127 127
 
128 128
 /* Exported functions */
129 129
 static cmd_export_t cmds[] = {
130
-	{"allow_routing",  allow_routing_0,  0, 0, 0,
130
+	{"allow_routing",  (cmd_function)allow_routing_0,  0, 0, 0,
131 131
 		REQUEST_ROUTE | FAILURE_ROUTE},
132
-	{"allow_routing",  allow_routing_1,  1, single_fixup, 0,
132
+	{"allow_routing",  (cmd_function)allow_routing_1,  1, single_fixup, 0,
133 133
 		REQUEST_ROUTE | FAILURE_ROUTE},
134
-	{"allow_routing",  allow_routing_2,  2, load_fixup, 0,
134
+	{"allow_routing",  (cmd_function)allow_routing_2,  2, load_fixup, 0,
135 135
 		REQUEST_ROUTE | FAILURE_ROUTE},
136
-	{"allow_register", allow_register_1, 1, single_fixup, 0,
136
+	{"allow_register", (cmd_function)allow_register_1, 1, single_fixup, 0,
137 137
 		REQUEST_ROUTE | FAILURE_ROUTE},
138
-	{"allow_register", allow_register_2, 2, load_fixup, 0,
138
+	{"allow_register", (cmd_function)allow_register_2, 2, load_fixup, 0,
139 139
 		REQUEST_ROUTE | FAILURE_ROUTE},
140
-	{"allow_trusted",  allow_trusted,    0, 0, 0,
140
+	{"allow_trusted",  (cmd_function)allow_trusted,    0, 0, 0,
141 141
 		REQUEST_ROUTE | FAILURE_ROUTE},
142
-	{"allow_uri", allow_uri, 2, double_fixup, 0,
142
+	{"allow_uri",      (cmd_function)allow_uri, 2, double_fixup, 0,
143 143
 		REQUEST_ROUTE | FAILURE_ROUTE},
144
-	{"set_address_group", set_address_group, 1, int_or_pvar_fixup, 0,
144
+	{"set_address_group", (cmd_function)set_address_group, 1, int_or_pvar_fixup, 0,
145 145
 		REQUEST_ROUTE | FAILURE_ROUTE},
146
-	{"allow_address", allow_address, 2, address_fixup, 0,
146
+	{"allow_address",  (cmd_function)allow_address, 2, address_fixup, 0,
147 147
 		REQUEST_ROUTE | FAILURE_ROUTE},
148
-	{"allow_source_address", allow_source_address, 1, int_or_pvar_fixup, 0,
148
+	{"allow_source_address", (cmd_function)allow_source_address, 1, int_or_pvar_fixup, 0,
149 149
 		REQUEST_ROUTE | FAILURE_ROUTE},
150
-	{"allow_source_address_group", allow_source_address_group, 0, 0, 0,
150
+	{"allow_source_address_group", (cmd_function)allow_source_address_group, 0, 0, 0,
151 151
 		REQUEST_ROUTE | FAILURE_ROUTE},
152 152
 	{0, 0, 0, 0, 0, 0}
153 153
 };
... ...
@@ -68,7 +68,7 @@ struct list_link*       timer = 0;
68 68
 
69 69
 
70 70
 static cmd_export_t cmds[]={
71
-	{"pike_check_req",  pike_check_req,  0,  0, 0, REQUEST_ROUTE},
71
+	{"pike_check_req",  (cmd_function)pike_check_req,  0,  0, 0, REQUEST_ROUTE},
72 72
 	{0,0,0,0,0,0}
73 73
 };
74 74
 
... ...
@@ -81,7 +81,7 @@ static param_export_t params[]={
81 81
 
82 82
 
83 83
 static mi_export_t mi_cmds [] = {
84
-	{MI_PIKE_LIST,   mi_pike_list,   MI_NO_INPUT_FLAG,  0,  0 },
84
+	{MI_PIKE_LIST, mi_pike_list,   MI_NO_INPUT_FLAG,  0,  0 },
85 85
 	{0,0,0,0,0}
86 86
 };
87 87
 
... ...
@@ -142,15 +142,15 @@ struct sl_binds slb;
142 142
  * Exported functions
143 143
  */
144 144
 static cmd_export_t cmds[] = {
145
-	{"save",         save,         1,    save_fixup, 0,
145
+	{"save",         (cmd_function)save,         1,    save_fixup, 0,
146 146
 			REQUEST_ROUTE },
147
-	{"save",         save,         2,    save_fixup, 0,
147
+	{"save",         (cmd_function)save,         2,    save_fixup, 0,
148 148
 			REQUEST_ROUTE },
149
-	{"lookup",       lookup,       1,  domain_fixup, 0,
149
+	{"lookup",       (cmd_function)lookup,       1,  domain_fixup, 0,
150 150
 			REQUEST_ROUTE | FAILURE_ROUTE },
151
-	{"registered",   registered,   1,  domain_fixup, 0,
151
+	{"registered",   (cmd_function)registered,   1,  domain_fixup, 0,
152 152
 			REQUEST_ROUTE | FAILURE_ROUTE },
153
-	{"add_sock_hdr", add_sock_hdr, 1,     str_fixup, 0,
153
+	{"add_sock_hdr", (cmd_function)add_sock_hdr, 1,     str_fixup, 0,
154 154
 			REQUEST_ROUTE },
155 155
 	{0, 0, 0, 0, 0, 0}
156 156
 };
... ...
@@ -84,22 +84,21 @@ static int w_is_direction(struct sip_msg *,char *, char *);
84 84
  * Exported functions
85 85
  */
86 86
 static cmd_export_t cmds[] = {
87
-	{"loose_route",          loose_route,           0,     0, 0,
87
+	{"loose_route",          (cmd_function)loose_route,           0,     0, 0,
88 88
 			REQUEST_ROUTE},
89
-	{"record_route",         w_record_route,        0,     0, 0,
89
+	{"record_route",         (cmd_function)w_record_route,        0,     0, 0,
90 90
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
91
-	{"record_route",         w_record_route,        1,     it_list_fixup, 0,
91
+	{"record_route",         (cmd_function)w_record_route,        1,     it_list_fixup, 0,
92 92
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
93
-	{"record_route_preset",  w_record_route_preset, 1,     it_list_fixup, 0,
93
+	{"record_route_preset",  (cmd_function)w_record_route_preset, 1,     it_list_fixup, 0,
94 94
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
95
-	{"add_rr_param",         w_add_rr_param,        1,     it_list_fixup, 0,
95
+	{"add_rr_param",         (cmd_function)w_add_rr_param,        1,     it_list_fixup, 0,
96 96
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
97
-	{"check_route_param",    w_check_route_param,   1,     fixup_str2regexp, 0,
97
+	{"check_route_param",    (cmd_function)w_check_route_param,   1,     fixup_str2regexp, 0,
98 98
 			REQUEST_ROUTE},
99
-	{"is_direction",         w_is_direction,        1,     direction_fixup, 0,
99
+	{"is_direction",         (cmd_function)w_is_direction,        1,     direction_fixup, 0,
100 100
 			REQUEST_ROUTE},
101
-	{"load_rr",              (cmd_function)load_rr, 0,     0, 0,
102
-			0},
101
+	{"load_rr",              (cmd_function)load_rr, 0, 0, 0, 0},
103 102
 	{0, 0, 0, 0, 0, 0}
104 103
 };
105 104
 
... ...
@@ -110,7 +110,7 @@ register_slcb_t register_slcb_f=NULL;
110 110
  * Exported functions
111 111
  */
112 112
 static cmd_export_t cmds[] = {
113
-	{"sip_trace", sip_trace, 0, 0, 0,
113
+	{"sip_trace", (cmd_function)sip_trace, 0, 0, 0,
114 114
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
115 115
 	{0, 0, 0, 0, 0, 0}
116 116
 };
... ...
@@ -71,9 +71,9 @@ stat_var *rcv_acks;
71 71
 
72 72
 
73 73
 static cmd_export_t cmds[]={
74
-	{"sl_send_reply",   w_sl_send_reply,            2,  fixup_sl_send_reply, 0,
74
+	{"sl_send_reply",   (cmd_function)w_sl_send_reply,            2,  fixup_sl_send_reply, 0,
75 75
 			REQUEST_ROUTE | ERROR_ROUTE },
76
-	{"sl_reply_error",  w_sl_reply_error,           0,  0, 0,
76
+	{"sl_reply_error",  (cmd_function)w_sl_reply_error,           0,  0, 0,
77 77
 			REQUEST_ROUTE},
78 78
 	{"register_slcb",  (cmd_function)register_slcb, 0,  0, 0,
79 79
 			0},
... ...
@@ -86,9 +86,9 @@ static proc_export_t sms_procs[] = {
86 86
 
87 87
 
88 88
 static cmd_export_t cmds[]={
89
-	{"sms_send_msg_to_net", w_sms_send_msg_to_net, 1, 
89
+	{"sms_send_msg_to_net", (cmd_function)w_sms_send_msg_to_net, 1, 
90 90
 	     fixup_sms_send_msg_to_net, 0, REQUEST_ROUTE},
91
-	{"sms_send_msg",        w_sms_send_msg,        0,  
91
+	{"sms_send_msg",        (cmd_function)w_sms_send_msg,        0,  
92 92
 	     0, 0,                         REQUEST_ROUTE},
93 93
 	{0,0,0,0,0,0}
94 94
 };
... ...
@@ -71,8 +71,8 @@ db_con_t* db_handle=0;   /* Database connection handle */
71 71
 
72 72
 /* Exported functions */
73 73
 static cmd_export_t cmds[] = {
74
-	{"sd_lookup", sd_lookup, 1, 0, 0, REQUEST_ROUTE},
75
-	{"sd_lookup", sd_lookup, 2, fixup_sd, 0, REQUEST_ROUTE},
74
+	{"sd_lookup", (cmd_function)sd_lookup, 1, 0, 0, REQUEST_ROUTE},
75
+	{"sd_lookup", (cmd_function)sd_lookup, 2, fixup_sd, 0, REQUEST_ROUTE},
76 76
 	{0, 0, 0, 0, 0, 0}
77 77
 };
78 78
 
... ...
@@ -89,7 +89,7 @@ struct dlg_binds *dlg_binds = &dialog_st;
89 89
  * Script commands we export.
90 90
  */
91 91
 static cmd_export_t cmds[]={
92
-	{"sstCheckMin", sst_check_min, 1, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE },
92
+	{"sstCheckMin", (cmd_function)sst_check_min, 1, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE },
93 93
 	{0,0,0,0,0,0}
94 94
 };
95 95
 
... ...
@@ -48,9 +48,9 @@ static int fixup_stat(void** param, int param_no);
48 48
 
49 49
 
50 50
 static cmd_export_t cmds[]={
51
-	{"update_stat",  w_update_stat,  2, fixup_stat, 0,
51
+	{"update_stat",  (cmd_function)w_update_stat,  2, fixup_stat, 0,
52 52
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE},
53
-	{"reset_stat",   w_reset_stat,    1, fixup_stat, 0,
53
+	{"reset_stat",   (cmd_function)w_reset_stat,    1, fixup_stat, 0,
54 54
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE},
55 55
 	{0,0,0,0,0,0}
56 56
 };
... ...
@@ -135,43 +135,43 @@ stat_var *tm_trans_inuse;
135 135
 
136 136
 
137 137
 static cmd_export_t cmds[]={
138
-	{"t_newtran",            w_t_newtran,             0, 0,
138
+	{"t_newtran",            (cmd_function)w_t_newtran,             0, 0,
139 139
 			0, REQUEST_ROUTE},
140
-	{"t_reply",              w_t_reply,               2, fixup_t_send_reply,
140
+	{"t_reply",              (cmd_function)w_t_reply,               2, fixup_t_send_reply,
141 141
 			0, REQUEST_ROUTE | FAILURE_ROUTE },
142
-	{"t_release",            w_t_release,             0, 0,
142
+	{"t_release",            (cmd_function)w_t_release,             0, 0,
143 143
 			0, REQUEST_ROUTE},
144
-	{"t_replicate",          w_t_replicate,           1, fixup_t_replicate,
144
+	{"t_replicate",          (cmd_function)w_t_replicate,           1, fixup_t_replicate,
145 145
 			0, REQUEST_ROUTE},
146
-	{"t_replicate",          w_t_replicate,           2, fixup_t_replicate,
146
+	{"t_replicate",          (cmd_function)w_t_replicate,           2, fixup_t_replicate,
147 147
 			0, REQUEST_ROUTE},
148
-	{"t_relay",              w_t_relay,               0, 0,
148
+	{"t_relay",              (cmd_function)w_t_relay,               0, 0,
149 149
 			0, REQUEST_ROUTE | FAILURE_ROUTE },
150
-	{"t_relay",              w_t_relay,               1, fixup_t_relay1,
150
+	{"t_relay",              (cmd_function)w_t_relay,               1, fixup_t_relay1,
151 151
 			0, REQUEST_ROUTE | FAILURE_ROUTE },
152
-	{"t_relay",              w_t_relay,               2, fixup_t_relay2,
152
+	{"t_relay",              (cmd_function)w_t_relay,               2, fixup_t_relay2,
153 153
 			0, REQUEST_ROUTE | FAILURE_ROUTE },
154
-	{"t_on_failure",         w_t_on_negative,         1, fixup_str2int,
154
+	{"t_on_failure",         (cmd_function)w_t_on_negative,         1, fixup_str2int,
155 155
 			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
156
-	{"t_on_reply",           w_t_on_reply,            1, fixup_str2int,
156
+	{"t_on_reply",           (cmd_function)w_t_on_reply,            1, fixup_str2int,
157 157
 			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
158
-	{"t_on_branch",          w_t_on_branch,           1, fixup_str2int,
158
+	{"t_on_branch",          (cmd_function)w_t_on_branch,           1, fixup_str2int,
159 159
 			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
160
-	{"t_check_status",       t_check_status,          1, fixup_str2regexp,
160
+	{"t_check_status",       (cmd_function)t_check_status,          1, fixup_str2regexp,
161 161
 			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
162
-	{"t_write_req",         t_write_req,              2, fixup_t_write,
162
+	{"t_write_req",          (cmd_function)t_write_req,              2, fixup_t_write,
163 163
 			0, REQUEST_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE },
164
-	{"t_write_unix",        t_write_unix,             2, fixup_t_write,
164
+	{"t_write_unix",         (cmd_function)t_write_unix,             2, fixup_t_write,
165 165
 			0, REQUEST_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE },
166
-	{"t_flush_flags",       t_flush_flags,            0, 0,
166
+	{"t_flush_flags",        (cmd_function)t_flush_flags,            0, 0,
167 167
 			0, REQUEST_ROUTE | BRANCH_ROUTE  },
168
-	{"t_local_replied",     t_local_replied,          1, fixup_local_replied,
168
+	{"t_local_replied",      (cmd_function)t_local_replied,          1, fixup_local_replied,
169 169
 			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
170
-	{"t_check_trans",       t_check_trans,            0, 0,
170
+	{"t_check_trans",        (cmd_function)t_check_trans,            0, 0,
171 171
 			0, REQUEST_ROUTE | BRANCH_ROUTE },
172
-	{"t_was_cancelled",     t_was_cancelled,          0, 0,
172
+	{"t_was_cancelled",      (cmd_function)t_was_cancelled,          0, 0,
173 173
 			0, FAILURE_ROUTE | ONREPLY_ROUTE },
174
-	{"load_tm",             (cmd_function)load_tm,    0, 0,
174
+	{"load_tm",              (cmd_function)load_tm,    0, 0,
175 175
 			0, 0},
176 176
 	{0,0,0,0,0,0}
177 177
 };
... ...
@@ -454,7 +454,7 @@ int load_tm( struct tm_binds *tmb)
454 454
 	tmb->register_tmcb = register_tmcb;
455 455
 
456 456
 	/* relay function */
457
-	tmb->t_relay = w_t_relay;
457
+	tmb->t_relay = (cmd_function)w_t_relay;
458 458
 	/* reply functions */
459 459
 	tmb->t_reply = (treply_f)w_t_reply;
460 460
 	tmb->t_reply_with_body = t_reply_with_body;
... ...
@@ -80,13 +80,13 @@ static void mod_destroy(void);
80 80
 
81 81
 /* Exported functions */
82 82
 static cmd_export_t cmds[]={
83
-	{"uac_replace_from",  w_replace_from2,  2, fixup_replace_from2, 0,
83
+	{"uac_replace_from",  (cmd_function)w_replace_from2,  2, fixup_replace_from2, 0,
84 84
 			REQUEST_ROUTE },
85
-	{"uac_replace_from",  w_replace_from1,  1, fixup_replace_from1, 0,
85
+	{"uac_replace_from",  (cmd_function)w_replace_from1,  1, fixup_replace_from1, 0,
86 86
 			REQUEST_ROUTE },
87
-	{"uac_restore_from",  w_restore_from,   0,                  0, 0,
87
+	{"uac_restore_from",  (cmd_function)w_restore_from,   0,                  0, 0,
88 88
 			REQUEST_ROUTE },
89
-	{"uac_auth",          w_uac_auth,       0,                  0, 0,
89
+	{"uac_auth",          (cmd_function)w_uac_auth,       0,                  0, 0,
90 90
 			FAILURE_ROUTE },
91 91
 	{0,0,0,0,0,0}
92 92
 };
... ...
@@ -68,13 +68,13 @@ static int setf_fixup(void** param, int param_no);
68 68
 
69 69
 
70 70
 static cmd_export_t cmds[] = {
71
-	{"set_deny_filter",   w_set_deny,      2,  setf_fixup, 0,
71
+	{"set_deny_filter",   (cmd_function)w_set_deny,      2,  setf_fixup, 0,
72 72
 			FAILURE_ROUTE },
73
-	{"set_accept_filter", w_set_accept,    2,  setf_fixup, 0,
73
+	{"set_accept_filter", (cmd_function)w_set_accept,    2,  setf_fixup, 0,
74 74
 			FAILURE_ROUTE },
75
-	{"get_redirects",      w_get_redirect2,  2,  get_redirect_fixup, 0,
75
+	{"get_redirects",     (cmd_function)w_get_redirect2,  2,  get_redirect_fixup, 0,
76 76
 			FAILURE_ROUTE },
77
-	{"get_redirects",      w_get_redirect1,  1,  get_redirect_fixup, 0,
77
+	{"get_redirects",     (cmd_function)w_get_redirect1,  1,  get_redirect_fixup, 0,
78 78
 			FAILURE_ROUTE },
79 79
 	{0, 0, 0, 0, 0, 0}
80 80
 };
... ...
@@ -56,13 +56,13 @@ static int pvar_fixup(void** param, int param_no);
56 56
  * Exported functions
57 57
  */
58 58
 static cmd_export_t cmds[] = {
59
-	{"is_user",        is_user,        1, str_fixup, 0, REQUEST_ROUTE},
60
-	{"has_totag", 	   has_totag,      0, 0, 0,         REQUEST_ROUTE},
61
-	{"uri_param",      uri_param_1,    1, str_fixup, 0, REQUEST_ROUTE},
62
-	{"uri_param",      uri_param_2,    2, uri_fixup, 0, REQUEST_ROUTE},
63
-	{"add_uri_param",  add_uri_param,  1, str_fixup, 0, REQUEST_ROUTE},
64
-	{"tel2sip",        tel2sip,        0, 0,         0, REQUEST_ROUTE},
65
-	{"is_uri_user_e164", is_uri_user_e164, 1, pvar_fixup, 0,
59
+	{"is_user",        (cmd_function)is_user,        1, str_fixup, 0, REQUEST_ROUTE},
60
+	{"has_totag", 	   (cmd_function)has_totag,      0, 0, 0,         REQUEST_ROUTE},
61
+	{"uri_param",      (cmd_function)uri_param_1,    1, str_fixup, 0, REQUEST_ROUTE},
62
+	{"uri_param",      (cmd_function)uri_param_2,    2, uri_fixup, 0, REQUEST_ROUTE},
63
+	{"add_uri_param",  (cmd_function)add_uri_param,  1, str_fixup, 0, REQUEST_ROUTE},
64
+	{"tel2sip",        (cmd_function)tel2sip,        0, 0,         0, REQUEST_ROUTE},
65
+	{"is_uri_user_e164", (cmd_function)is_uri_user_e164, 1, pvar_fixup, 0,
66 66
 	 REQUEST_ROUTE|FAILURE_ROUTE},
67 67
 	{0, 0, 0, 0, 0, 0}
68 68
 };
... ...
@@ -101,9 +101,9 @@ static int fixup_exist(void** param, int param_no);
101 101
  * Exported functions
102 102
  */
103 103
 static cmd_export_t cmds[] = {
104
-	{"check_to",       check_to,       0, 0, 0,           REQUEST_ROUTE},
105
-	{"check_from",     check_from,     0, 0, 0,           REQUEST_ROUTE},
106
-	{"does_uri_exist", does_uri_exist, 0, fixup_exist, 0, REQUEST_ROUTE},
104
+	{"check_to",       (cmd_function)check_to,       0, 0, 0,           REQUEST_ROUTE},
105
+	{"check_from",     (cmd_function)check_from,     0, 0, 0,           REQUEST_ROUTE},
106
+	{"does_uri_exist", (cmd_function)does_uri_exist, 0, fixup_exist, 0, REQUEST_ROUTE},
107 107
 	{0, 0, 0, 0, 0, 0}
108 108
 };
109 109