Browse code

- cmd_export_t has a new field: free_fixup - it is the function to be called if you want to free the structure resulted after calling the fixup function - to be used in dynamic environments, like perl scripts, where you have to call fixup function every time you call a function exported by modules - for future, a better cleanup of used memory can be achived by freeing fixed strucutred in config file - fixup functions in core got the free_fixup pair if is the case - textops has some free_fixup functions set - dev version increased

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

Daniel-Constantin Mierla authored on 04/10/2007 11:21:22
Showing 73 changed files
... ...
@@ -162,21 +162,21 @@ static int acc_fixup(void** param, int param_no);
162 162
 
163 163
 
164 164
 static cmd_export_t cmds[] = {
165
-	{"acc_log_request", w_acc_log_request, 1, acc_fixup,
165
+	{"acc_log_request", w_acc_log_request, 1, acc_fixup, 0,
166 166
 			REQUEST_ROUTE|FAILURE_ROUTE},
167 167
 #ifdef SQL_ACC
168
-	{"acc_db_request",  w_acc_db_request,  2, acc_fixup,
168
+	{"acc_db_request",  w_acc_db_request,  2, acc_fixup, 0,
169 169
 			REQUEST_ROUTE|FAILURE_ROUTE},
170 170
 #endif
171 171
 #ifdef RAD_ACC
172
-	{"acc_rad_request", w_acc_rad_request, 1, acc_fixup,
172
+	{"acc_rad_request", w_acc_rad_request, 1, acc_fixup, 0,
173 173
 			REQUEST_ROUTE|FAILURE_ROUTE},
174 174
 #endif
175 175
 #ifdef DIAM_ACC
176
-	{"acc_diam_request",w_acc_diam_request,1, acc_fixup,
176
+	{"acc_diam_request",w_acc_diam_request,1, acc_fixup, 0,
177 177
 			REQUEST_ROUTE|FAILURE_ROUTE},
178 178
 #endif
179
-	{0, 0, 0, 0, 0}
179
+	{0, 0, 0, 0, 0, 0}
180 180
 };
181 181
 
182 182
 
... ...
@@ -69,8 +69,9 @@ 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, REQUEST_ROUTE|FAILURE_ROUTE},
73
-	{0, 0, 0, 0, 0}
72
+	{"alias_db_lookup", alias_db_lookup, 1, 0, 0,
73
+		REQUEST_ROUTE|FAILURE_ROUTE},
74
+	{0, 0, 0, 0, 0, 0}
74 75
 };
75 76
 
76 77
 
... ...
@@ -123,24 +123,24 @@ static pv_spec_t passwd_spec;
123 123
  */
124 124
 static cmd_export_t cmds[] = {
125 125
 	{"www_challenge",       www_challenge,           2, challenge_fixup,
126
-			REQUEST_ROUTE},
126
+			0, REQUEST_ROUTE},
127 127
 	{"proxy_challenge",     proxy_challenge,         2, challenge_fixup,
128
-			REQUEST_ROUTE},
128
+			0, REQUEST_ROUTE},
129 129
 	{"pv_www_authorize",    pv_www_authorize,        1, auth_fixup,
130
-			REQUEST_ROUTE},
130
+			0, REQUEST_ROUTE},
131 131
 	{"pv_proxy_authorize",  pv_proxy_authorize,      1, auth_fixup,
132
-			REQUEST_ROUTE},
132
+			0, REQUEST_ROUTE},
133 133
 	{"consume_credentials", consume_credentials,     0, 0,
134
-			REQUEST_ROUTE},
134
+			0, REQUEST_ROUTE},
135 135
 	{"is_rpid_user_e164",   is_rpid_user_e164,       0, 0,
136
-			REQUEST_ROUTE},
136
+			0, REQUEST_ROUTE},
137 137
 	{"append_rpid_hf",      append_rpid_hf,          0, 0,
138
-			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
138
+			0, REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
139 139
 	{"append_rpid_hf",      append_rpid_hf_p,        2, rpid_fixup,
140
-			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
140
+			0, REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
141 141
 	{"bind_auth",           (cmd_function)bind_auth, 0, 0,
142
-			0},
143
-	{0, 0, 0, 0, 0}
142
+			0, 0},
143
+	{0, 0, 0, 0, 0, 0}
144 144
 };
145 145
 
146 146
 
... ...
@@ -113,9 +113,9 @@ 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, REQUEST_ROUTE},
117
-	{"proxy_authorize", proxy_authorize, 2, auth_fixup, REQUEST_ROUTE},
118
-	{0, 0, 0, 0, 0}
116
+	{"www_authorize",   www_authorize,   2, auth_fixup, 0, REQUEST_ROUTE},
117
+	{"proxy_authorize", proxy_authorize, 2, auth_fixup, 0, REQUEST_ROUTE},
118
+	{0, 0, 0, 0, 0, 0}
119 119
 };
120 120
 
121 121
 
... ...
@@ -77,12 +77,12 @@ rd_buf_t *rb;
77 77
  */
78 78
 static cmd_export_t cmds[] = {
79 79
 	{"diameter_www_authorize",   diameter_www_authorize,   1, auth_fixup,
80
-			REQUEST_ROUTE},
80
+			0, REQUEST_ROUTE},
81 81
 	{"diameter_proxy_authorize", diameter_proxy_authorize, 1, auth_fixup,
82
-			REQUEST_ROUTE},
82
+			0, REQUEST_ROUTE},
83 83
 	{"diameter_is_user_in",      diameter_is_user_in,      2, group_fixup,
84
-			REQUEST_ROUTE},
85
-	{0, 0, 0, 0, 0}
84
+			0, REQUEST_ROUTE},
85
+	{0, 0, 0, 0, 0, 0}
86 86
 };
87 87
 
88 88
 
... ...
@@ -68,12 +68,12 @@ static int service_type = -1;
68 68
  */
69 69
 static cmd_export_t cmds[] = {
70 70
 	{"radius_www_authorize",   radius_www_authorize,   1, auth_fixup,
71
-			REQUEST_ROUTE},
71
+			0, REQUEST_ROUTE},
72 72
 	{"radius_proxy_authorize", radius_proxy_authorize_1, 1, auth_fixup,
73
-			REQUEST_ROUTE},
73
+			0, REQUEST_ROUTE},
74 74
 	{"radius_proxy_authorize", radius_proxy_authorize_2, 2, auth_fixup,
75
-			REQUEST_ROUTE},
76
-	{0, 0, 0, 0, 0}
75
+			0, REQUEST_ROUTE},
76
+	{0, 0, 0, 0, 0, 0}
77 77
 };
78 78
 
79 79
 
... ...
@@ -76,8 +76,9 @@ struct val vals[V_MAX];
76 76
  * Exported functions
77 77
  */
78 78
 static cmd_export_t cmds[] = {
79
-	{"avp_load_radius", load_avp_radius, 1, load_avp_fixup, REQUEST_ROUTE | FAILURE_ROUTE},
80
-	{0, 0, 0, 0, 0}
79
+	{"avp_load_radius", load_avp_radius, 1, load_avp_fixup, 0,
80
+		REQUEST_ROUTE | FAILURE_ROUTE},
81
+	{0, 0, 0, 0, 0, 0}
81 82
 };
82 83
 
83 84
 
... ...
@@ -91,33 +91,33 @@ 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,
94
+	{"avp_print",  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,
96
+	{"avp_db_load",   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,
98
+	{"avp_db_delete", 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,
100
+	{"avp_db_store",  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,
102
+	{"avp_db_query",  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,
104
+	{"avp_db_query",  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,
106
+	{"avp_delete", 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,
108
+	{"avp_copy",   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,
110
+	{"avp_pushto", 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,
112
+	{"avp_check",  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,
114
+	{"avp_op",     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,
116
+	{"avp_subst",  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,
118
+	{"is_avp_set", w_is_avp_set, 1, fixup_is_avp_set, 0,
119 119
 					REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
120
-	{0, 0, 0, 0, 0}
120
+	{0, 0, 0, 0, 0, 0}
121 121
 };
122 122
 
123 123
 
... ...
@@ -99,12 +99,12 @@ 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,
102
+	{ "bm_start_timer", 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,
104
+	{ "bm_log_timer",   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},
107
-	{ 0, 0, 0, 0, 0 }
106
+	{"load_bm", (cmd_function)load_bm, 0, 0, 0, 0},
107
+	{ 0, 0, 0, 0, 0, 0 }
108 108
 };
109 109
 
110 110
 
... ...
@@ -106,20 +106,20 @@ static int parse_avp_param(char *s, int *flags, int_str *name);
106 106
 
107 107
 /************* Module Exports **********************************************/
108 108
 static cmd_export_t cmds[]={
109
-	{"cr_rewrite_uri",           route_uri,             2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
110
-	{"cr_prime_balance_uri",     prime_balance_uri,     2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
111
-	{"cr_rewrite_by_to",         route_by_to,           2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
112
-	{"cr_prime_balance_by_to",   prime_balance_by_to,   2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
113
-	{"cr_rewrite_by_from",       route_by_from,         2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
114
-	{"cr_prime_balance_by_from", prime_balance_by_from, 2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
115
-	{"cr_user_rewrite_uri",      user_route_uri,        2, user_route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
116
-	{"cr_tree_rewrite_uri",      tree_route_uri,        2, tree_route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
109
+	{"cr_rewrite_uri",           route_uri,             2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
110
+	{"cr_prime_balance_uri",     prime_balance_uri,     2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
111
+	{"cr_rewrite_by_to",         route_by_to,           2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
112
+	{"cr_prime_balance_by_to",   prime_balance_by_to,   2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
113
+	{"cr_rewrite_by_from",       route_by_from,         2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
114
+	{"cr_prime_balance_by_from", prime_balance_by_from, 2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
115
+	{"cr_user_rewrite_uri",      user_route_uri,        2, user_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
116
+	{"cr_tree_rewrite_uri",      tree_route_uri,        2, tree_route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
117 117
 // this function is only needed for the 0700 functionality, and obselete
118 118
 // needs the add-rewrite-branches patch for the rewrite_branches function in core
119 119
 #ifdef SP_ROUTE2_0700
120
-	{"cr_rewrite_branches",      rewrite_branches,      2, route_fixup, REQUEST_ROUTE | FAILURE_ROUTE },
120
+	{"cr_rewrite_branches",      rewrite_branches,      2, route_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
121 121
 #endif
122
-	{0, 0, 0, 0, 0}
122
+	{0, 0, 0, 0, 0, 0}
123 123
 };
124 124
 
125 125
 static param_export_t params[]= {
... ...
@@ -84,20 +84,20 @@ static cmd_export_t cmds[]={
84 84
 	{"rand_set_prob", /* action name as in scripts */
85 85
 		set_prob,  /* C function name */
86 86
 		1,          /* number of parameters */
87
-		fixup_prob,          /* */
87
+		fixup_prob, 0,         /* */
88 88
 		/* can be applied to original/failed requests and replies */
89 89
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE}, 
90
-	{"rand_reset_prob", reset_prob, 0, 0,
90
+	{"rand_reset_prob", reset_prob, 0, 0, 0,
91 91
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE}, 
92
-	{"rand_get_prob", get_prob, 0, 0,
92
+	{"rand_get_prob", get_prob, 0, 0, 0,
93 93
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
94
-	{"rand_event", rand_event, 0, 0,
94
+	{"rand_event", rand_event, 0, 0, 0,
95 95
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
96
-	{"sleep",    m_sleep,    1,      fixup_str2int, 
96
+	{"sleep",    m_sleep,    1,      fixup_str2int, 0, 
97 97
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
98
-	{"usleep",   m_usleep,   1,      fixup_str2int, 
98
+	{"usleep",   m_usleep,   1,      fixup_str2int, 0,
99 99
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
100
-	{0, 0, 0, 0, 0}
100
+	{0, 0, 0, 0, 0, 0}
101 101
 };
102 102
 
103 103
 static param_export_t params[]={ 
... ...
@@ -126,12 +126,12 @@ static proc_export_t cpl_procs[] = {
126 126
  */
127 127
 static cmd_export_t cmds[] = {
128 128
 	{"cpl_run_script",            cpl_invoke_script,        2,
129
-			fixup_cpl_run_script, REQUEST_ROUTE},
129
+			fixup_cpl_run_script, 0, REQUEST_ROUTE},
130 130
 	{"cpl_process_register",      w_process_register,       0,
131
-			0,                    REQUEST_ROUTE},
131
+			0, 0,                    REQUEST_ROUTE},
132 132
 	{"cpl_process_register_norpl",w_process_register_norpl, 0,
133
-			0,                    REQUEST_ROUTE},
134
-	{0, 0, 0, 0, 0}
133
+			0, 0,                    REQUEST_ROUTE},
134
+	{0, 0, 0, 0, 0, 0}
135 135
 };
136 136
 
137 137
 
... ...
@@ -51,16 +51,16 @@ int db_mode = 0;  /* Database usage mode: 0 = cache, 1 = no cache */
51 51
  * Exported functions
52 52
  */
53 53
 static cmd_export_t cmds[] = {
54
-	{"db_use_table",   (cmd_function)dbt_use_table,  2, 0, 0},
55
-	{"db_init",        (cmd_function)dbt_init,       1, 0, 0},
56
-	{"db_close",       (cmd_function)dbt_close,      2, 0, 0},
57
-	{"db_query",       (cmd_function)dbt_query,      2, 0, 0},
58
-	{"db_raw_query",   (cmd_function)dbt_raw_query,  2, 0, 0},
59
-	{"db_free_result", (cmd_function)dbt_free_query, 2, 0, 0},
60
-	{"db_insert",      (cmd_function)dbt_insert,     2, 0, 0},
61
-	{"db_delete",      (cmd_function)dbt_delete,     2, 0, 0},
62
-	{"db_update",      (cmd_function)dbt_update,     2, 0, 0},
63
-	{0, 0, 0, 0, 0}
54
+	{"db_use_table",   (cmd_function)dbt_use_table,  2, 0, 0, 0},
55
+	{"db_init",        (cmd_function)dbt_init,       1, 0, 0, 0},
56
+	{"db_close",       (cmd_function)dbt_close,      2, 0, 0, 0},
57
+	{"db_query",       (cmd_function)dbt_query,      2, 0, 0, 0},
58
+	{"db_raw_query",   (cmd_function)dbt_raw_query,  2, 0, 0, 0},
59
+	{"db_free_result", (cmd_function)dbt_free_query, 2, 0, 0, 0},
60
+	{"db_insert",      (cmd_function)dbt_insert,     2, 0, 0, 0},
61
+	{"db_delete",      (cmd_function)dbt_delete,     2, 0, 0, 0},
62
+	{"db_update",      (cmd_function)dbt_update,     2, 0, 0, 0},
63
+	{0, 0, 0, 0, 0, 0}
64 64
 };
65 65
 
66 66
 
... ...
@@ -99,8 +99,8 @@ static int pv_get_dlg_count( struct sip_msg *msg, pv_param_t *param,
99 99
 
100 100
 
101 101
 static cmd_export_t cmds[]={
102
-	{"load_dlg",  (cmd_function)load_dlg,   0, 0,  0},
103
-	{0,0,0,0,0}
102
+	{"load_dlg",  (cmd_function)load_dlg,   0, 0, 0, 0},
103
+	{0,0,0,0,0,0}
104 104
 };
105 105
 
106 106
 static param_export_t mod_params[]={
... ...
@@ -111,15 +111,15 @@ 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, REQUEST_ROUTE},
115
-	{"ds_select_domain", w_ds_select_domain, 2, ds_fixup, REQUEST_ROUTE},
116
-	{"ds_next_dst",      w_ds_next_dst,      0, ds_warn_fixup, FAILURE_ROUTE},
117
-	{"ds_next_domain",   w_ds_next_domain,   0, ds_warn_fixup, FAILURE_ROUTE},
118
-	{"ds_mark_dst",      w_ds_mark_dst0,     0, ds_warn_fixup, FAILURE_ROUTE},
119
-	{"ds_mark_dst",      w_ds_mark_dst1,     1, ds_warn_fixup, FAILURE_ROUTE},
120
-	{"ds_is_from_list",  w_ds_is_from_list0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
121
-	{"ds_is_from_list",  w_ds_is_from_list1, 1, fixup_str2int, REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
122
-	{0,0,0,0,0}
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},
122
+	{0,0,0,0,0,0}
123 123
 };
124 124
 
125 125
 
... ...
@@ -60,8 +60,8 @@ 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, REQUEST_ROUTE | FAILURE_ROUTE},
64
-	{0, 0, 0, 0, 0}
63
+	{"add_diversion",    add_diversion,    1, str_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE},
64
+	{0, 0, 0, 0, 0, 0}
65 65
 };
66 66
 
67 67
 
... ...
@@ -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,
91
+	{"is_from_local",       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,
93
+	{"is_uri_host_local",   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,
95
+	{"is_domain_local",     w_is_domain_local,   1,  parameter_fixup, 0,
96 96
 			REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
97 97
 	{0, 0, 0, 0, 0}
98 98
 };
... ...
@@ -104,9 +104,9 @@ 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, REQUEST_ROUTE},
108
-	{"dp_apply_policy", dp_apply_policy, 0, 0, REQUEST_ROUTE},
109
-	{0, 0, 0, 0, 0}
107
+	{"dp_can_connect",  dp_can_connect,  0, 0, 0, REQUEST_ROUTE},
108
+	{"dp_apply_policy", dp_apply_policy, 0, 0, 0, REQUEST_ROUTE},
109
+	{0, 0, 0, 0, 0, 0}
110 110
 };
111 111
 
112 112
 
... ...
@@ -78,19 +78,19 @@ 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,            REQUEST_ROUTE},
82
-	{"enum_query",        enum_query_1,     1, str_fixup,    REQUEST_ROUTE},
83
-	{"enum_query",        enum_query_2,     2, enum_fixup,   REQUEST_ROUTE},
84
-	{"enum_fquery",       enum_fquery_0,    0, 0,            REQUEST_ROUTE},
85
-	{"enum_fquery",       enum_fquery_1,    1, str_fixup,    REQUEST_ROUTE},
86
-	{"enum_fquery",       enum_fquery_2,    2, enum_fixup,   REQUEST_ROUTE},
87
-	{"is_from_user_enum", is_from_user_enum_0, 0, 0,         REQUEST_ROUTE},
88
-	{"is_from_user_enum", is_from_user_enum_1, 1, str_fixup, REQUEST_ROUTE},
89
-	{"is_from_user_enum", is_from_user_enum_2, 2, enum_fixup,REQUEST_ROUTE},
90
-	{"i_enum_query",      i_enum_query_0,   0, 0,            REQUEST_ROUTE},
91
-	{"i_enum_query",      i_enum_query_1,   1, str_fixup,    REQUEST_ROUTE},
92
-	{"i_enum_query",      i_enum_query_2,   2, enum_fixup,   REQUEST_ROUTE},
93
-	{0, 0, 0, 0, 0}
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},
93
+	{0, 0, 0, 0, 0, 0}
94 94
 };
95 95
 
96 96
 
... ...
@@ -60,11 +60,11 @@ 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,  REQUEST_ROUTE|FAILURE_ROUTE},
64
-	{"exec_msg",  w_exec_msg,  1, it_list_fixup,  REQUEST_ROUTE|FAILURE_ROUTE},
65
-	{"exec_avp",  w_exec_avp,  1, it_list_fixup,  REQUEST_ROUTE|FAILURE_ROUTE},
66
-	{"exec_avp",  w_exec_avp,  2, exec_avp_fixup, REQUEST_ROUTE|FAILURE_ROUTE},
67
-	{0, 0, 0, 0, 0}
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},
67
+	{0, 0, 0, 0, 0, 0}
68 68
 };
69 69
 
70 70
 
... ...
@@ -71,11 +71,11 @@ time_t local_timestamp;
71 71
  * Flatstore database module interface
72 72
  */
73 73
 static cmd_export_t cmds[] = {
74
-	{"db_use_table",   (cmd_function)flat_use_table, 2, 0, 0},
75
-	{"db_init",        (cmd_function)flat_db_init,   1, 0, 0},
76
-	{"db_close",       (cmd_function)flat_db_close,  2, 0, 0},
77
-	{"db_insert",      (cmd_function)flat_db_insert, 2, 0, 0},
78
-	{0, 0, 0, 0, 0}
74
+	{"db_use_table",   (cmd_function)flat_use_table, 2, 0, 0, 0},
75
+	{"db_init",        (cmd_function)flat_db_init,   1, 0, 0, 0},
76
+	{"db_close",       (cmd_function)flat_db_close,  2, 0, 0, 0},
77
+	{"db_insert",      (cmd_function)flat_db_insert, 2, 0, 0, 0},
78
+	{0, 0, 0, 0, 0, 0}
79 79
 };
80 80
 
81 81
 
... ...
@@ -81,13 +81,13 @@ 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,
84
+	{"set_gflag",    set_gflag,   1,   fixup_gflags, 0,
85 85
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
86
-	{"reset_gflag",  reset_gflag, 1,   fixup_gflags,
86
+	{"reset_gflag",  reset_gflag, 1,   fixup_gflags, 0,
87 87
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
88
-	{"is_gflag",     is_gflag,    1,   fixup_gflags,
88
+	{"is_gflag",     is_gflag,    1,   fixup_gflags, 0,
89 89
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
90
-	{0, 0, 0, 0, 0}
90
+	{0, 0, 0, 0, 0, 0}
91 91
 };
92 92
 
93 93
 static param_export_t params[]={
... ...
@@ -123,11 +123,11 @@ 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,
126
+	{"is_user_in",      is_user_in,      2,  hf_fixup, 0,
127 127
 			REQUEST_ROUTE|FAILURE_ROUTE},
128
-	{"get_user_group",  get_user_group,  2,  get_gid_fixup,
128
+	{"get_user_group",  get_user_group,  2,  get_gid_fixup, 0,
129 129
 			REQUEST_ROUTE|FAILURE_ROUTE},
130
-	{0, 0, 0, 0, 0}
130
+	{0, 0, 0, 0, 0, 0}
131 131
 };
132 132
 
133 133
 
... ...
@@ -60,8 +60,8 @@ int use_domain = 0;  /* By default we use domain */
60 60
  * Exported functions
61 61
  */
62 62
 static cmd_export_t cmds[] = {
63
-	{"radius_is_user_in", radius_is_user_in, 2, hf_fixup, REQUEST_ROUTE},
64
-	{0, 0, 0, 0, 0}
63
+	{"radius_is_user_in", radius_is_user_in, 2, hf_fixup, 0, REQUEST_ROUTE},
64
+	{0, 0, 0, 0, 0, 0}
65 65
 };
66 66
 
67 67
 
... ...
@@ -78,14 +78,14 @@ ldap_api_t ldap_api;
78 78
  */
79 79
 static cmd_export_t cmds[] = {
80 80
 	{"h350_sipuri_lookup",           w_h350_sipuri_lookup,     1,
81
-	 one_str_pv_elem_fixup,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
81
+	 one_str_pv_elem_fixup, 0,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
82 82
 	{"h350_auth_lookup",             w_h350_auth_lookup,       2,
83
-	 h350_auth_lookup_fixup,         REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
83
+	 h350_auth_lookup_fixup, 0,         REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
84 84
 	{"h350_result_call_preferences", w_h350_call_preferences,  1,
85
-	 one_str_pv_elem_fixup,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
85
+	 one_str_pv_elem_fixup, 0,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
86 86
 	{"h350_result_service_level",    w_h350_service_level,     1,
87
-	 one_str_pv_elem_fixup,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
88
-	{0, 0, 0, 0, 0}
87
+	 one_str_pv_elem_fixup, 0,          REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
88
+	{0, 0, 0, 0, 0, 0}
89 89
 };
90 90
 
91 91
 
... ...
@@ -89,8 +89,8 @@ struct tm_binds tmb;
89 89
 void inv_callback( struct cell *t, int type, struct tmcb_params *ps);
90 90
 
91 91
 static cmd_export_t cmds[]={
92
-	{"imc_manager",  imc_manager, 0, 0, REQUEST_ROUTE},
93
-	{0,0,0,0,0}
92
+	{"imc_manager",  imc_manager, 0, 0, 0, REQUEST_ROUTE},
93
+	{0,0,0,0,0,0}
94 94
 };
95 95
 
96 96
 
... ...
@@ -135,15 +135,15 @@ void destroy(void);
135 135
  * Exported functions
136 136
  */
137 137
 static cmd_export_t cmds[] = {
138
-	{"jab_send_message",       xj_send_message,                     0,              0, REQUEST_ROUTE},
139
-	{"jab_join_jconf",         xj_join_jconf,                       0,              0, REQUEST_ROUTE},
140
-	{"jab_exit_jconf",         xj_exit_jconf,                       0,              0, REQUEST_ROUTE},
141
-	{"jab_go_online",          xj_go_online,                        0,              0, REQUEST_ROUTE},
142
-	{"jab_go_offline",         xj_go_offline,                       0,              0, REQUEST_ROUTE},
143
-	{"jab_register_watcher",   (cmd_function)xj_register_watcher,   XJ_NO_SCRIPT_F, 0, 0            },
144
-	{"jab_unregister_watcher", (cmd_function)xj_unregister_watcher, XJ_NO_SCRIPT_F, 0, 0            },
145
-	{"load_xjab",              (cmd_function)load_xjab,             XJ_NO_SCRIPT_F, 0, 0            },
146
-	{0, 0, 0, 0, 0}
138
+	{"jab_send_message",       xj_send_message,                     0,              0, 0, REQUEST_ROUTE},
139
+	{"jab_join_jconf",         xj_join_jconf,                       0,              0, 0, REQUEST_ROUTE},
140
+	{"jab_exit_jconf",         xj_exit_jconf,                       0,              0, 0, REQUEST_ROUTE},
141
+	{"jab_go_online",          xj_go_online,                        0,              0, 0, REQUEST_ROUTE},
142
+	{"jab_go_offline",         xj_go_offline,                       0,              0, 0, REQUEST_ROUTE},
143
+	{"jab_register_watcher",   (cmd_function)xj_register_watcher,   XJ_NO_SCRIPT_F, 0, 0, 0            },
144
+	{"jab_unregister_watcher", (cmd_function)xj_unregister_watcher, XJ_NO_SCRIPT_F, 0, 0, 0            },
145
+	{"load_xjab",              (cmd_function)load_xjab,             XJ_NO_SCRIPT_F, 0, 0, 0            },
146
+	{0, 0, 0, 0, 0, 0}
147 147
 };
148 148
 
149 149
 
... ...
@@ -253,25 +253,25 @@ int next_contacts (struct sip_msg*, char*, char*);
253 253
  * Exported functions
254 254
  */
255 255
 static cmd_export_t cmds[] = {
256
-	{"load_gws",      load_gws,      0, 0,
256
+	{"load_gws",      load_gws,      0, 0, 0,
257 257
 		REQUEST_ROUTE | FAILURE_ROUTE},
258
-	{"load_gws",      load_gws_grp,  1, fixstringloadgws,
258
+	{"load_gws",      load_gws_grp,  1, fixstringloadgws, 0,
259 259
 		REQUEST_ROUTE | FAILURE_ROUTE},
260
-	{"next_gw",       next_gw,       0, 0,
260
+	{"next_gw",       next_gw,       0, 0, 0,
261 261
 		REQUEST_ROUTE | FAILURE_ROUTE},
262
-	{"from_gw",       from_gw,       0, 0,
262
+	{"from_gw",       from_gw,       0, 0, 0,
263 263
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
264
-	{"from_gw",       from_gw_grp,   1, fixup_str2int,
264
+	{"from_gw",       from_gw_grp,   1, fixup_str2int, 0,
265 265
 		REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},
266
-	{"to_gw",         to_gw,         0, 0,
266
+	{"to_gw",         to_gw,         0, 0, 0,
267 267
 		REQUEST_ROUTE | FAILURE_ROUTE},
268
-	{"to_gw",         to_gw_grp,     1, fixup_str2int,
268
+	{"to_gw",         to_gw_grp,     1, fixup_str2int, 0,
269 269
 		REQUEST_ROUTE | FAILURE_ROUTE},
270
-	{"load_contacts", load_contacts, 0, 0,
270
+	{"load_contacts", load_contacts, 0, 0, 0,
271 271
 		REQUEST_ROUTE},
272
-	{"next_contacts", next_contacts, 0, 0,
272
+	{"next_contacts", next_contacts, 0, 0, 0,
273 273
 		REQUEST_ROUTE | FAILURE_ROUTE},
274
-	{0, 0, 0, 0, 0}
274
+	{0, 0, 0, 0, 0, 0}
275 275
 };
276 276
 
277 277
 
... ...
@@ -96,30 +96,30 @@ static dictionary* config_vals = NULL;
96 96
 */
97 97
 static cmd_export_t cmds[] = {
98 98
 	{"ldap_search",            w_ldap_search,            1, 
99
-		ldap_search_fixup,
99
+		ldap_search_fixup, 0,
100 100
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
101 101
 	{"ldap_result",            w_ldap_result1,           1, 
102
-		ldap_result_fixup,
102
+		ldap_result_fixup, 0,
103 103
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
104 104
 	{"ldap_result",            w_ldap_result2,           2, 
105
-		ldap_result_fixup, 
105
+		ldap_result_fixup, 0,
106 106
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
107 107
 	{"ldap_result_next",       w_ldap_result_next,       0, 
108
-		0,
108
+		0, 0,
109 109
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
110 110
 	{"ldap_result_check",      w_ldap_result_check_1,    1, 
111
-		ldap_result_check_fixup,
111
+		ldap_result_check_fixup, 0,
112 112
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
113 113
 	{"ldap_result_check",      w_ldap_result_check_2,    2, 
114
-		ldap_result_check_fixup,
114
+		ldap_result_check_fixup, 0,
115 115
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
116 116
 	{"ldap_filter_url_encode", w_ldap_filter_url_encode, 2, 
117
-		ldap_filter_url_encode_fixup,
117
+		ldap_filter_url_encode_fixup, 0,
118 118
 		REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE},
119 119
 	{"load_ldap",              (cmd_function)load_ldap,  0,
120
-		0,
120
+		0, 0,
121 121
 		0},
122
-	{0, 0, 0, 0, 0}
122
+	{0, 0, 0, 0, 0, 0}
123 123
 };
124 124
 
125 125
 
... ...
@@ -94,12 +94,12 @@ 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, REQUEST_ROUTE|ONREPLY_ROUTE}, // fixup_char2str?
98
-	{"sdp_mangle_port",sdp_mangle_port, 1,0, REQUEST_ROUTE|ONREPLY_ROUTE},// fixup_char2int if I use an int as offset
99
-	{"encode_contact",encode_contact,2,0,REQUEST_ROUTE|ONREPLY_ROUTE},//fixup_char2str
100
-	{"decode_contact",decode_contact,0,0,REQUEST_ROUTE},
101
-	{"decode_contact_header",decode_contact_header,0,0,REQUEST_ROUTE|ONREPLY_ROUTE},
102
-	{0, 0, 0, 0, 0}
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},
102
+	{0, 0, 0, 0, 0, 0}
103 103
 };
104 104
 
105 105
 
... ...
@@ -59,10 +59,10 @@ static int mod_init(void);
59 59
 
60 60
 static cmd_export_t cmds[]={
61 61
 	{"mf_process_maxfwd_header", w_process_maxfwd_header, 1,
62
-		fixup_maxfwd_header, REQUEST_ROUTE},
62
+		fixup_maxfwd_header, 0, REQUEST_ROUTE},
63 63
 	{"is_maxfwd_lt", is_maxfwd_lt, 1,
64
-		fixup_maxfwd_header, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
65
-	{0,0,0,0,0}
64
+		fixup_maxfwd_header, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
65
+	{0,0,0,0,0,0}
66 66
 };
67 67
 
68 68
 static param_export_t params[]={
... ...
@@ -198,11 +198,11 @@ NatTest natTests[] = {
198 198
 };
199 199
 
200 200
 static cmd_export_t commands[] = {
201
-    {"fix_contact",       FixContact,      0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
202
-    {"use_media_proxy",   UseMediaProxy,   0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
203
-    {"end_media_session", EndMediaSession, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
204
-    {"client_nat_test",   ClientNatTest,   1, fixup_str2int, REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
205
-    {0, 0, 0, 0, 0}
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},
205
+    {0, 0, 0, 0, 0, 0}
206 206
 };
207 207
 
208 208
 static param_export_t parameters[] = {
... ...
@@ -174,11 +174,11 @@ int check_message_support(struct sip_msg* msg);
174 174
 static void m_tm_callback( struct cell *t, int type, struct tmcb_params *ps);
175 175
 
176 176
 static cmd_export_t cmds[]={
177
-	{"m_store",  m_store, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE},
178
-	{"m_store",  m_store, 1, fixup_msilo, REQUEST_ROUTE | FAILURE_ROUTE},
179
-	{"m_dump",   m_dump,  0, 0, REQUEST_ROUTE},
180
-	{"m_dump",   m_dump,  1, fixup_msilo, REQUEST_ROUTE},
181
-	{0,0,0,0,0}
177
+	{"m_store",  m_store, 0, 0, 0, REQUEST_ROUTE | FAILURE_ROUTE},
178
+	{"m_store",  m_store, 1, fixup_msilo, 0, REQUEST_ROUTE | FAILURE_ROUTE},
179
+	{"m_dump",   m_dump,  0, 0, 0, REQUEST_ROUTE},
180
+	{"m_dump",   m_dump,  1, fixup_msilo, 0, REQUEST_ROUTE},
181
+	{0,0,0,0,0,0}
182 182
 };
183 183
 
184 184
 
... ...
@@ -46,20 +46,20 @@ MODULE_VERSION
46 46
  * MySQL database module interface
47 47
  */
48 48
 static cmd_export_t cmds[] = {
49
-	{"db_use_table",        (cmd_function)db_mysql_use_table,     2, 0, 0},
50
-	{"db_init",             (cmd_function)db_mysql_init,          1, 0, 0},
51
-	{"db_close",            (cmd_function)db_mysql_close,         2, 0, 0},
52
-	{"db_query",            (cmd_function)db_mysql_query,         2, 0, 0},
53
-	{"db_fetch_result",     (cmd_function)db_mysql_fetch_result,  2, 0, 0},
54
-	{"db_raw_query",        (cmd_function)db_mysql_raw_query,     2, 0, 0},
55
-	{"db_free_result",      (cmd_function)db_mysql_free_result,   2, 0, 0},
56
-	{"db_insert",           (cmd_function)db_mysql_insert,        2, 0, 0},
57
-	{"db_delete",           (cmd_function)db_mysql_delete,        2, 0, 0},
58
-	{"db_update",           (cmd_function)db_mysql_update,        2, 0, 0},
59
-	{"db_replace",          (cmd_function)db_mysql_replace,       2, 0, 0},
60
-	{"db_last_inserted_id", (cmd_function)db_last_inserted_id,    1, 0, 0},
61
-	{"db_insert_update",    (cmd_function)db_insert_update,       2, 0, 0},
62
-	{0, 0, 0, 0, 0}
49
+	{"db_use_table",        (cmd_function)db_mysql_use_table,     2, 0, 0, 0},
50
+	{"db_init",             (cmd_function)db_mysql_init,          1, 0, 0, 0},
51
+	{"db_close",            (cmd_function)db_mysql_close,         2, 0, 0, 0},
52
+	{"db_query",            (cmd_function)db_mysql_query,         2, 0, 0, 0},
53
+	{"db_fetch_result",     (cmd_function)db_mysql_fetch_result,  2, 0, 0, 0},
54
+	{"db_raw_query",        (cmd_function)db_mysql_raw_query,     2, 0, 0, 0},
55
+	{"db_free_result",      (cmd_function)db_mysql_free_result,   2, 0, 0, 0},
56
+	{"db_insert",           (cmd_function)db_mysql_insert,        2, 0, 0, 0},
57
+	{"db_delete",           (cmd_function)db_mysql_delete,        2, 0, 0, 0},
58
+	{"db_update",           (cmd_function)db_mysql_update,        2, 0, 0, 0},
59
+	{"db_replace",          (cmd_function)db_mysql_replace,       2, 0, 0, 0},
60
+	{"db_last_inserted_id", (cmd_function)db_last_inserted_id,    1, 0, 0, 0},
61
+	{"db_insert_update",    (cmd_function)db_insert_update,       2, 0, 0, 0},
62
+	{0, 0, 0, 0, 0, 0}
63 63
 };
64 64
 
65 65
 
... ...
@@ -375,33 +375,33 @@ struct rtpp_set * default_rtpp_set=0;
375 375
 unsigned int *natping_state=0;
376 376
 
377 377
 static cmd_export_t cmds[] = {
378
-	{"fix_nated_contact",  fix_nated_contact_f,    0, 0,
378
+	{"fix_nated_contact",  fix_nated_contact_f,    0, 0, 0,
379 379
 			REQUEST_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE},
380
-	{"fix_nated_sdp",      fix_nated_sdp_f,        1, fixup_fix_sdp,
380
+	{"fix_nated_sdp",      fix_nated_sdp_f,        1, fixup_fix_sdp, 0,
381 381
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
382
-	{"fix_nated_sdp",      fix_nated_sdp_f,        2, fixup_fix_sdp,
382
+	{"fix_nated_sdp",      fix_nated_sdp_f,        2, fixup_fix_sdp, 0,
383 383
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
384
-	{"set_rtp_proxy_set",  set_rtp_proxy_set_f,    1, fixup_set_id,
384
+	{"set_rtp_proxy_set",  set_rtp_proxy_set_f,    1, fixup_set_id, 0,
385 385
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
386
-	{"unforce_rtp_proxy",  unforce_rtp_proxy_f,    0, 0,
386
+	{"unforce_rtp_proxy",  unforce_rtp_proxy_f,    0, 0, 0,
387 387
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
388
-	{"force_rtp_proxy",    force_rtp_proxy0_f,     0, 0,
388
+	{"force_rtp_proxy",    force_rtp_proxy0_f,     0, 0, 0,
389 389
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
390
-	{"force_rtp_proxy",    force_rtp_proxy1_f,     1, 0,
390
+	{"force_rtp_proxy",    force_rtp_proxy1_f,     1, 0, 0,
391 391
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
392
-	{"force_rtp_proxy",    force_rtp_proxy2_f,     2, 0,
392
+	{"force_rtp_proxy",    force_rtp_proxy2_f,     2, 0, 0,
393 393
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
394
-	{"nat_uac_test",       nat_uac_test_f,         1, fixup_str2int,
394
+	{"nat_uac_test",       nat_uac_test_f,         1, fixup_str2int, 0,
395 395
 			REQUEST_ROUTE | ONREPLY_ROUTE | FAILURE_ROUTE | BRANCH_ROUTE},
396
-	{"fix_nated_register", fix_nated_register_f,   0, fixup_fix_nated_register,
396
+	{"fix_nated_register", fix_nated_register_f,   0, fixup_fix_nated_register, 0,
397 397
 			REQUEST_ROUTE },
398
-	{"add_rcv_param",      add_rcv_param_f,        0, 0,
398
+	{"add_rcv_param",      add_rcv_param_f,        0, 0, 0,
399 399
 			REQUEST_ROUTE },
400
-	{"add_rcv_param",      add_rcv_param_f,        1, fixup_str2int,
400
+	{"add_rcv_param",      add_rcv_param_f,        1, fixup_str2int, 0,
401 401
 			REQUEST_ROUTE },
402
-	{"start_recording",    start_recording_f,      0, 0,
402
+	{"start_recording",    start_recording_f,      0, 0, 0,
403 403
 			REQUEST_ROUTE | ONREPLY_ROUTE },
404
-	{0, 0, 0, 0, 0}
404
+	{0, 0, 0, 0, 0, 0}
405 405
 };
406 406
 
407 407
 static param_export_t params[] = {
... ...
@@ -57,8 +57,8 @@ static int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar);
57 57
  * Exported functions
58 58
  */
59 59
 static cmd_export_t cmds[] = {
60
-	{"options_reply", (cmd_function)opt_reply, 0, 0, REQUEST_ROUTE},
61
-	{0, 0, 0, 0, 0}
60
+	{"options_reply", (cmd_function)opt_reply, 0, 0, 0, REQUEST_ROUTE},
61
+	{0, 0, 0, 0, 0, 0}
62 62
 };
63 63
 
64 64
 /*
... ...
@@ -79,15 +79,15 @@ static int  ospVerifyParameters(void);
79 79
 static void ospDumpParameters(void);
80 80
 
81 81
 static cmd_export_t cmds[]={
82
-    {"checkospheader",          ospCheckHeader,      0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
83
-    {"validateospheader",       ospValidateHeader,   0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
84
-    {"requestosprouting",       ospRequestRouting,   0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
85
-    {"checkosproute",           ospCheckRoute,       0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
86
-    {"prepareosproute",         ospPrepareRoute,     0, 0, BRANCH_ROUTE}, 
87
-    {"prepareallosproutes",     ospPrepareAllRoutes, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
88
-    {"checkcallingtranslation", ospCheckTranslation, 0, 0, BRANCH_ROUTE}, 
89
-    {"reportospusage",          ospReportUsage,      1, 0, REQUEST_ROUTE}, 
90
-    {0, 0, 0, 0, 0}
82
+    {"checkospheader",          ospCheckHeader,      0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
83
+    {"validateospheader",       ospValidateHeader,   0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
84
+    {"requestosprouting",       ospRequestRouting,   0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
85
+    {"checkosproute",           ospCheckRoute,       0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
86
+    {"prepareosproute",         ospPrepareRoute,     0, 0, 0, BRANCH_ROUTE}, 
87
+    {"prepareallosproutes",     ospPrepareAllRoutes, 0, 0, 0, REQUEST_ROUTE|FAILURE_ROUTE}, 
88
+    {"checkcallingtranslation", ospCheckTranslation, 0, 0, 0, BRANCH_ROUTE}, 
89
+    {"reportospusage",          ospReportUsage,      1, 0, 0, REQUEST_ROUTE}, 
90
+    {0, 0, 0, 0, 0, 0}
91 91
 };
92 92
 
93 93
 static param_export_t params[]={
... ...
@@ -68,11 +68,11 @@ 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,         REQUEST_ROUTE },
72
-	{ "add_path",          add_path_usr,          1,  str_fixup, REQUEST_ROUTE },
73
-	{ "add_path_received", add_path_received,     0,  0,         REQUEST_ROUTE },
74
-	{ "add_path_received", add_path_received_usr, 1,  str_fixup, REQUEST_ROUTE },
75
-	{ 0, 0, 0, 0, 0 }
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 },
75
+	{ 0, 0, 0, 0, 0, 0 }
76 76
 };
77 77
 
78 78
 
... ...
@@ -107,10 +107,10 @@ 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, REQUEST_ROUTE|FAILURE_ROUTE},
111
-	{"prefix2domain", w_prefix2domain_1, 1, 0, REQUEST_ROUTE|FAILURE_ROUTE},
112
-	{"prefix2domain", w_prefix2domain_2, 2, 0, REQUEST_ROUTE|FAILURE_ROUTE},
113
-	{0, 0, 0, 0, 0}
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},
113
+	{0, 0, 0, 0, 0, 0}
114 114
 };
115 115
 
116 116
 static param_export_t params[]={
... ...
@@ -93,19 +93,19 @@ struct mi_root* perl_mi_reload(struct mi_root *cmd_tree, void *param);
93 93
  * Exported functions
94 94
  */
95 95
 static cmd_export_t cmds[] = {
96
-	{ "perl_exec_simple", perl_exec_simple1, 1,  NULL, REQUEST_ROUTE
96
+	{ "perl_exec_simple", perl_exec_simple1, 1,  NULL, 0, REQUEST_ROUTE
97 97
 							   | FAILURE_ROUTE
98 98
 							   | ONREPLY_ROUTE
99 99
 							   | BRANCH_ROUTE },
100
-	{ "perl_exec_simple", perl_exec_simple2, 2,  NULL, REQUEST_ROUTE
100
+	{ "perl_exec_simple", perl_exec_simple2, 2,  NULL, 0, REQUEST_ROUTE
101 101
 							   | FAILURE_ROUTE
102 102
 							   | ONREPLY_ROUTE
103 103
 							   | BRANCH_ROUTE },
104
-	{ "perl_exec", perl_exec1, 1,  NULL, REQUEST_ROUTE | FAILURE_ROUTE
104
+	{ "perl_exec", perl_exec1, 1,  NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE
105 105
 							   | ONREPLY_ROUTE | BRANCH_ROUTE },
106
-	{ "perl_exec", perl_exec2, 2, NULL, REQUEST_ROUTE | FAILURE_ROUTE
106
+	{ "perl_exec", perl_exec2, 2, NULL, 0, REQUEST_ROUTE | FAILURE_ROUTE
107 107
 							   | ONREPLY_ROUTE | BRANCH_ROUTE },
108
-	{ 0, 0, 0, 0, 0 }
108
+	{ 0, 0, 0, 0, 0, 0 }
109 109
 };
110 110
 
111 111
 
... ...
@@ -40,15 +40,15 @@ SV* vdbmod;
40 40
  * Perl virtual database module interface
41 41
  */
42 42
 static cmd_export_t cmds[] = {
43
-	{"db_use_table",	(cmd_function)perlvdb_use_table, 2, 0, 0},
44
-	{"db_init",		(cmd_function)perlvdb_db_init,   1, 0, 0},
45
-	{"db_close",		(cmd_function)perlvdb_db_close,  2, 0, 0},
46
-	{"db_insert",		(cmd_function)perlvdb_db_insert, 2, 0, 0},
47
-	{"db_update",		(cmd_function)perlvdb_db_update, 2, 0, 0},
48
-	{"db_delete",		(cmd_function)perlvdb_db_delete, 2, 0, 0},
49
-	{"db_query",		(cmd_function)perlvdb_db_query, 2, 0, 0},
50
-	{"db_free_result",	(cmd_function)perlvdb_db_free_result, 2, 0, 0},
51
-	{0, 0, 0, 0, 0}
43
+	{"db_use_table",	(cmd_function)perlvdb_use_table, 2, 0, 0, 0},
44
+	{"db_init",		(cmd_function)perlvdb_db_init,   1, 0, 0, 0},
45
+	{"db_close",		(cmd_function)perlvdb_db_close,  2, 0, 0, 0},
46
+	{"db_insert",		(cmd_function)perlvdb_db_insert, 2, 0, 0, 0},
47
+	{"db_update",		(cmd_function)perlvdb_db_update, 2, 0, 0, 0},
48
+	{"db_delete",		(cmd_function)perlvdb_db_delete, 2, 0, 0, 0},
49
+	{"db_query",		(cmd_function)perlvdb_db_query, 2, 0, 0, 0},
50
+	{"db_free_result",	(cmd_function)perlvdb_db_free_result, 2, 0, 0, 0},
51
+	{0, 0, 0, 0, 0, 0}
52 52
 };
53 53
 
54 54
 
... ...
@@ -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,
130
+	{"allow_routing",  allow_routing_0,  0, 0, 0,
131 131
 		REQUEST_ROUTE | FAILURE_ROUTE},
132
-	{"allow_routing",  allow_routing_1,  1, single_fixup,
132
+	{"allow_routing",  allow_routing_1,  1, single_fixup, 0,
133 133
 		REQUEST_ROUTE | FAILURE_ROUTE},
134
-	{"allow_routing",  allow_routing_2,  2, load_fixup,
134
+	{"allow_routing",  allow_routing_2,  2, load_fixup, 0,
135 135
 		REQUEST_ROUTE | FAILURE_ROUTE},
136
-	{"allow_register", allow_register_1, 1, single_fixup,
136
+	{"allow_register", allow_register_1, 1, single_fixup, 0,
137 137
 		REQUEST_ROUTE | FAILURE_ROUTE},
138
-	{"allow_register", allow_register_2, 2, load_fixup,
138
+	{"allow_register", allow_register_2, 2, load_fixup, 0,
139 139
 		REQUEST_ROUTE | FAILURE_ROUTE},
140
-	{"allow_trusted",  allow_trusted,    0, 0,
140
+	{"allow_trusted",  allow_trusted,    0, 0, 0,
141 141
 		REQUEST_ROUTE | FAILURE_ROUTE},
142
-	{"allow_uri", allow_uri, 2, double_fixup,
142
+	{"allow_uri", allow_uri, 2, double_fixup, 0,
143 143
 		REQUEST_ROUTE | FAILURE_ROUTE},
144
-	{"set_address_group", set_address_group, 1, int_or_pvar_fixup,
144
+	{"set_address_group", set_address_group, 1, int_or_pvar_fixup, 0,
145 145
 		REQUEST_ROUTE | FAILURE_ROUTE},
146
-	{"allow_address", allow_address, 2, address_fixup,
146
+	{"allow_address", allow_address, 2, address_fixup, 0,
147 147
 		REQUEST_ROUTE | FAILURE_ROUTE},
148
-	{"allow_source_address", allow_source_address, 1, int_or_pvar_fixup,
148
+	{"allow_source_address", allow_source_address, 1, int_or_pvar_fixup, 0,
149 149
 		REQUEST_ROUTE | FAILURE_ROUTE},
150
-	{0, 0, 0, 0, 0}
150
+	{0, 0, 0, 0, 0, 0}
151 151
 };
152 152
 
153 153
 /* Exported parameters */
... ...
@@ -68,8 +68,8 @@ 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, REQUEST_ROUTE},
72
-	{0,0,0,0,0}
71
+	{"pike_check_req",  pike_check_req,  0,  0, 0, REQUEST_ROUTE},
72
+	{0,0,0,0,0,0}
73 73
 };
74 74
 
75 75
 static param_export_t params[]={
... ...
@@ -41,17 +41,17 @@ static int mod_init(void);
41 41
  */
42 42
 
43 43
 static cmd_export_t cmds[]={
44
-	{"db_use_table",    (cmd_function)pg_use_table,    2, 0, 0},
45
-	{"db_init",         (cmd_function)pg_init,         1, 0, 0},
46
-	{"db_close",        (cmd_function)pg_close,        2, 0, 0},
47
-	{"db_query",        (cmd_function)pg_query,        2, 0, 0},
48
-	{"db_fetch_result", (cmd_function)pg_fetch_result, 2, 0, 0},
49
-	{"db_raw_query",    (cmd_function)pg_raw_query,    2, 0, 0},
50
-	{"db_free_result",  (cmd_function)pg_free_query,   2, 0, 0},
51
-	{"db_insert",       (cmd_function)pg_insert,       2, 0, 0},
52
-	{"db_delete",       (cmd_function)pg_delete,       2, 0, 0},
53
-	{"db_update",       (cmd_function)pg_update,       2, 0, 0},
54
-	{0,0,0,0,0}
44
+	{"db_use_table",    (cmd_function)pg_use_table,    2, 0, 0, 0},
45
+	{"db_init",         (cmd_function)pg_init,         1, 0, 0, 0},
46
+	{"db_close",        (cmd_function)pg_close,        2, 0, 0, 0},
47
+	{"db_query",        (cmd_function)pg_query,        2, 0, 0, 0},
48
+	{"db_fetch_result", (cmd_function)pg_fetch_result, 2, 0, 0, 0},
49
+	{"db_raw_query",    (cmd_function)pg_raw_query,    2, 0, 0, 0},
50
+	{"db_free_result",  (cmd_function)pg_free_query,   2, 0, 0, 0},
51
+	{"db_insert",       (cmd_function)pg_insert,       2, 0, 0, 0},
52
+	{"db_delete",       (cmd_function)pg_delete,       2, 0, 0, 0},
53
+	{"db_update",       (cmd_function)pg_update,       2, 0, 0, 0},
54
+	{0,0,0,0,0,0}
55 55
 };
56 56
 
57 57
 
... ...
@@ -118,11 +118,11 @@ phtable_t* pres_htable;
118 118
 
119 119
 static cmd_export_t cmds[]=
120 120
 {
121
-	{"handle_publish",		handle_publish,	     0,	   0,         REQUEST_ROUTE},
122
-	{"handle_publish",		handle_publish,	     1,fixup_presence,REQUEST_ROUTE},
123
-	{"handle_subscribe",	handle_subscribe,	 0,	   0,         REQUEST_ROUTE},
124
-	{"bind_presence",(cmd_function)bind_presence,1,    0,            0         },
125
-	{0,						0,				     0,	   0,            0	       }	 
121
+	{"handle_publish",		handle_publish,	     0,	   0,         0, REQUEST_ROUTE},
122
+	{"handle_publish",		handle_publish,	     1,fixup_presence,0, REQUEST_ROUTE},
123
+	{"handle_subscribe",	handle_subscribe,	 0,	   0,         0, REQUEST_ROUTE},
124
+	{"bind_presence",(cmd_function)bind_presence,1,    0,            0, 0         },
125
+	{0,						0,				     0,	   0,            0, 0	       }	 
126 126
 };
127 127
 
128 128
 static param_export_t params[]={
... ...
@@ -53,7 +53,7 @@ add_event_t pres_add_event;
53 53
 /* module exported commands */
54 54
 static cmd_export_t cmds[] =
55 55
 {
56
-    {0,	0, 0, 0, 0}
56
+    {0,	0, 0, 0, 0, 0}
57 57
 };
58 58
 
59 59
 /* module exported paramaters */
... ...
@@ -91,9 +91,9 @@ void hashT_clean(unsigned int ticks,void *param);
91 91
 
92 92
 static cmd_export_t cmds[]=
93 93
 {
94
-	{"bind_libxml_api",  (cmd_function)bind_libxml_api,  1, 0, 0},
95
-	{"bind_pua",	     (cmd_function)bind_pua,		 1, 0, 0},
96
-	{0,							0,					     0, 0, 0} 
94
+	{"bind_libxml_api",  (cmd_function)bind_libxml_api,  1, 0, 0, 0},
95
+	{"bind_pua",	     (cmd_function)bind_pua,		 1, 0, 0, 0},
96
+	{0,							0,					     0, 0, 0, 0} 
97 97
 };
98 98
 
99 99
 static param_export_t params[]={
... ...
@@ -54,9 +54,9 @@ int bla_set_flag(struct sip_msg* , char*, char*);
54 54
 
55 55
 static cmd_export_t cmds[]=
56 56
 {
57
-	{"bla_set_flag",            bla_set_flag,		 0, 0, REQUEST_ROUTE},
58
-	{"bla_handle_notify",		bla_handle_notify,   0, 0, REQUEST_ROUTE}, 	
59
-	{0,							0,					 0, 0, 0} 
57
+	{"bla_set_flag",            bla_set_flag,		 0, 0, 0, REQUEST_ROUTE},
58
+	{"bla_handle_notify",		bla_handle_notify,   0, 0, 0, REQUEST_ROUTE}, 	
59
+	{0,							0, 0,					 0, 0, 0} 
60 60
 };
61 61
 static param_export_t params[]=
62 62
 {
... ...
@@ -71,8 +71,8 @@ send_subscribe_t pua_send_subscribe;
71 71
 
72 72
 static cmd_export_t cmds[]=
73 73
 {
74
-	{"pua_set_publish",			pua_set_publish,   0, 0, REQUEST_ROUTE}, 	
75
-	{0,							0,				   0, 0, 0} 
74
+	{"pua_set_publish",			pua_set_publish,   0, 0, 0, REQUEST_ROUTE}, 	
75
+	{0,							0, 0,				   0, 0, 0} 
76 76
 };
77 77
 
78 78
 static param_export_t params[]={
... ...
@@ -87,9 +87,9 @@ static int fixup_pua_xmpp(void** param, int param_no);
87 87
 
88 88
 static cmd_export_t cmds[]=
89 89
 {
90
-	{"pua_xmpp_notify",		 Notify2Xmpp,	0,		0,		  REQUEST_ROUTE},
91
-	{"pua_xmpp_req_winfo",   request_winfo,	2,  fixup_pua_xmpp,REQUEST_ROUTE},
92
-	{     0,			       0,		    0,		0,			   0	    }
90
+	{"pua_xmpp_notify",		 Notify2Xmpp,	0,		0,		  0, REQUEST_ROUTE},
91
+	{"pua_xmpp_req_winfo",   request_winfo,	2,  fixup_pua_xmpp, 0,REQUEST_ROUTE},
92
+	{     0,			       0,		    0, 0,		0,			   0	    }
93 93
 };
94 94
 
95 95
 static param_export_t params[]={
... ...
@@ -142,17 +142,17 @@ struct sl_binds slb;
142 142
  * Exported functions
143 143
  */
144 144
 static cmd_export_t cmds[] = {
145
-	{"save",         save,         1,    save_fixup,
145
+	{"save",         save,         1,    save_fixup, 0,
146 146
 			REQUEST_ROUTE },
147
-	{"save",         save,         2,    save_fixup,
147
+	{"save",         save,         2,    save_fixup, 0,
148 148
 			REQUEST_ROUTE },
149
-	{"lookup",       lookup,       1,  domain_fixup,
149
+	{"lookup",       lookup,       1,  domain_fixup, 0,
150 150
 			REQUEST_ROUTE | FAILURE_ROUTE },
151
-	{"registered",   registered,   1,  domain_fixup,
151
+	{"registered",   registered,   1,  domain_fixup, 0,
152 152
 			REQUEST_ROUTE | FAILURE_ROUTE },
153
-	{"add_sock_hdr", add_sock_hdr, 1,     str_fixup,
153
+	{"add_sock_hdr", add_sock_hdr, 1,     str_fixup, 0,
154 154
 			REQUEST_ROUTE },
155
-	{0, 0, 0, 0, 0}
155
+	{0, 0, 0, 0, 0, 0}
156 156
 };
157 157
 
158 158
 
... ...
@@ -127,9 +127,9 @@ int add_rls_event(modparam_t type, void* val);
127 127
 
128 128
 static cmd_export_t cmds[]=
129 129
 {
130
-	{"rls_handle_subscribe",	rls_handle_subscribe,  0,	 0, REQUEST_ROUTE},
131
-	{"rls_handle_notify",   	rls_handle_notify,     0,	 0, REQUEST_ROUTE},
132
-	{0,				        		  0,		       0,	 0,     0	     }	 
130
+	{"rls_handle_subscribe",	rls_handle_subscribe,  0,	 0, 0, REQUEST_ROUTE},
131
+	{"rls_handle_notify",   	rls_handle_notify,     0,	 0, 0, REQUEST_ROUTE},
132
+	{0,				        		  0, 0,		       0,	 0,     0	     }	 
133 133
 };
134 134
 
135 135
 static param_export_t params[]={
... ...
@@ -84,23 +84,23 @@ 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,
87
+	{"loose_route",          loose_route,           0,     0, 0,
88 88
 			REQUEST_ROUTE},
89
-	{"record_route",         w_record_route,        0,     0,
89
+	{"record_route",         w_record_route,        0,     0, 0,
90 90
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE},
91
-	{"record_route",         w_record_route,        1,     it_list_fixup,
91
+	{"record_route",         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,
93
+	{"record_route_preset",  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,
95
+	{"add_rr_param",         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,
97
+	{"check_route_param",    w_check_route_param,   1,     fixup_str2regexp, 0,
98 98
 			REQUEST_ROUTE},
99
-	{"is_direction",         w_is_direction,        1,     direction_fixup,
99
+	{"is_direction",         w_is_direction,        1,     direction_fixup, 0,
100 100
 			REQUEST_ROUTE},
101
-	{"load_rr",              (cmd_function)load_rr, 0,     0,
101
+	{"load_rr",              (cmd_function)load_rr, 0,     0, 0,
102 102
 			0},
103
-	{0, 0, 0, 0, 0}
103
+	{0, 0, 0, 0, 0, 0}
104 104
 };
105 105
 
106 106
 
... ...
@@ -87,9 +87,9 @@ struct seas_functions seas_f;
87 87
 
88 88
 static cmd_export_t cmds[]=
89 89
 {
90
-   {"as_relay_t", w_as_relay_t, 1,fixup_as_relay, REQUEST_ROUTE},
91
-   {"as_relay_sl", w_as_relay_sl, 1,fixup_as_relay, REQUEST_ROUTE},
92
-   {0,0,0,0,0}
90
+   {"as_relay_t", w_as_relay_t, 1,fixup_as_relay, 0, REQUEST_ROUTE},
91
+   {"as_relay_sl", w_as_relay_sl, 1,fixup_as_relay, 0, REQUEST_ROUTE},
92
+   {0,0,0,0,0,0}
93 93
 };
94 94
 
95 95
 static param_export_t params[]=
... ...
@@ -110,9 +110,9 @@ 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,
113
+	{"sip_trace", sip_trace, 0, 0, 0,
114 114
 		REQUEST_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE|BRANCH_ROUTE},
115
-	{0, 0, 0, 0, 0}
115
+	{0, 0, 0, 0, 0, 0}
116 116
 };
117 117
 
118 118
 
... ...
@@ -71,15 +71,15 @@ 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,
74
+	{"sl_send_reply",   w_sl_send_reply,            2,  fixup_sl_send_reply, 0,
75 75
 			REQUEST_ROUTE | ERROR_ROUTE | ONREPLY_ROUTE },
76
-	{"sl_reply_error",  w_sl_reply_error,           0,  0,
76
+	{"sl_reply_error",  w_sl_reply_error,           0,  0, 0,
77 77
 			REQUEST_ROUTE},
78
-	{"register_slcb",  (cmd_function)register_slcb, 0,  0,
78
+	{"register_slcb",  (cmd_function)register_slcb, 0,  0, 0,
79 79
 			0},
80
-	{"load_sl",        (cmd_function)load_sl,       0,  0,
80
+	{"load_sl",        (cmd_function)load_sl,       0,  0, 0,
81 81
 			0},
82
-	{0,0,0,0,0}
82
+	{0,0,0,0,0,0}
83 83
 };
84 84
 
85 85
 static param_export_t mod_params[]={
... ...
@@ -87,10 +87,10 @@ static proc_export_t sms_procs[] = {
87 87
 
88 88
 static cmd_export_t cmds[]={
89 89
 	{"sms_send_msg_to_net", w_sms_send_msg_to_net, 1, 
90
-	     fixup_sms_send_msg_to_net, REQUEST_ROUTE},
90
+	     fixup_sms_send_msg_to_net, 0, REQUEST_ROUTE},
91 91
 	{"sms_send_msg",        w_sms_send_msg,        0,  
92
-	     0,                         REQUEST_ROUTE},
93
-	{0,0,0,0,0}
92
+	     0, 0,                         REQUEST_ROUTE},
93
+	{0,0,0,0,0,0}
94 94
 };
95 95
 
96 96
 
... ...
@@ -71,9 +71,9 @@ 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, REQUEST_ROUTE},
75
-	{"sd_lookup", sd_lookup, 2, fixup_sd, REQUEST_ROUTE},
76
-	{0, 0, 0, 0, 0}
74
+	{"sd_lookup", sd_lookup, 1, 0, 0, REQUEST_ROUTE},
75
+	{"sd_lookup", sd_lookup, 2, fixup_sd, 0, REQUEST_ROUTE},
76
+	{0, 0, 0, 0, 0, 0}
77 77
 };
78 78
 
79 79
 
... ...
@@ -89,8 +89,8 @@ 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, REQUEST_ROUTE | ONREPLY_ROUTE },
93
-	{0,0,0,0,0}
92
+	{"sstCheckMin", sst_check_min, 1, 0, 0, REQUEST_ROUTE | ONREPLY_ROUTE },
93
+	{0,0,0,0,0,0}
94 94
 };
95 95
 
96 96
 /*
... ...
@@ -48,11 +48,11 @@ 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,
51
+	{"update_stat",  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,
53
+	{"reset_stat",   w_reset_stat,    1, fixup_stat, 0,
54 54
 			REQUEST_ROUTE|BRANCH_ROUTE|FAILURE_ROUTE|ONREPLY_ROUTE},
55
-	{0,0,0,0,0}
55
+	{0,0,0,0,0,0}
56 56
 };
57 57
 
58 58
 static param_export_t mod_params[]={
... ...
@@ -122,57 +122,65 @@ static int mod_init(void);
122 122
 
123 123
 
124 124
 static cmd_export_t cmds[]={
125
-	{"search",           search_f,          1, fixup_str2regexp, 
125
+	{"search",           search_f,          1, fixup_str2regexp,
126
+			free_fixup_str2regexp,
126 127
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
127
-	{"search_body",      search_body_f,     1, fixup_str2regexp, 
128
+	{"search_body",      search_body_f,     1, fixup_str2regexp,
129
+			free_fixup_str2regexp,
128 130
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
129
-	{"search_append",    search_append_f,   2, fixup_str2regexp, 
131
+	{"search_append",    search_append_f,   2, fixup_str2regexp,
132
+			free_fixup_str2regexp,
130 133
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
131
-	{"search_append_body", search_append_body_f,   2, fixup_str2regexp, 
134
+	{"search_append_body", search_append_body_f,   2, fixup_str2regexp,
135
+			free_fixup_str2regexp, 
132 136
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
133
-	{"replace",          replace_f,         2, fixup_str2regexp, 
137
+	{"replace",          replace_f,         2, fixup_str2regexp,
138
+			free_fixup_str2regexp,
134 139
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
135 140
 	{"replace_body",     replace_body_f,    2, fixup_str2regexp, 
141
+			free_fixup_str2regexp,
136 142
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
137 143
 	{"replace_all",      replace_all_f,     2, fixup_str2regexp, 
144
+			free_fixup_str2regexp,
138 145
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
139
-	{"replace_body_all", replace_body_all_f,2, fixup_str2regexp, 
146
+	{"replace_body_all", replace_body_all_f,2, fixup_str2regexp,
147
+			free_fixup_str2regexp,
140 148
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
141
-	{"append_to_reply",  append_to_reply_f, 1, it_list_fixup,
149
+	{"append_to_reply",  append_to_reply_f, 1, it_list_fixup, 0,
142 150
 			REQUEST_ROUTE|BRANCH_ROUTE|ERROR_ROUTE},
143
-	{"append_hf",        append_hf_1,       1, add_header_fixup,
151
+	{"append_hf",        append_hf_1,       1, add_header_fixup, 0,
144 152
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
145
-	{"append_hf",        append_hf_2,       2, add_header_fixup,
153
+	{"append_hf",        append_hf_2,       2, add_header_fixup, 0,
146 154
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
147
-	{"insert_hf",        insert_hf_1,       1, add_header_fixup,
155
+	{"insert_hf",        insert_hf_1,       1, add_header_fixup, 0,
148 156
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
149
-	{"insert_hf",        insert_hf_2,       2, add_header_fixup,
157
+	{"insert_hf",        insert_hf_2,       2, add_header_fixup, 0,
150 158
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
151
-	{"append_urihf",     append_urihf,      2, str_fixup,   
159
+	{"append_urihf",     append_urihf,      2, str_fixup, free_str_fixup,
152 160
 			REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
153
-	{"remove_hf",        remove_hf_f,       1, hname_fixup,
161
+	{"remove_hf",        remove_hf_f,       1, hname_fixup, 0,
154 162
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
155
-	{"is_present_hf",    is_present_hf_f,   1, hname_fixup,
163
+	{"is_present_hf",    is_present_hf_f,   1, hname_fixup, 0,
156 164
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
157
-	{"subst",            subst_f,           1, fixup_substre,
165
+	{"subst",            subst_f,           1, fixup_substre, 0,
158 166
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
159
-	{"subst_uri",        subst_uri_f,       1, fixup_substre,
167
+	{"subst_uri",        subst_uri_f,       1, fixup_substre, 0,
160 168
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
161
-	{"subst_user",       subst_user_f,      1, fixup_substre,
169
+	{"subst_user",       subst_user_f,      1, fixup_substre, 0,
162 170
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
163
-	{"subst_body",       subst_body_f,      1, fixup_substre,
171
+	{"subst_body",       subst_body_f,      1, fixup_substre, 0,
164 172
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
165
-	{"append_time",      append_time_f,     0, 0,
173
+	{"append_time",      append_time_f,     0, 0, 0,
166 174
 			REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
167
-	{"is_method",        is_method_f,       1, fixup_method,
175
+	{"is_method",        is_method_f,       1, fixup_method, 0,
168 176
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
169
-	{"has_body",         has_body_f,        0, 0,
177
+	{"has_body",         has_body_f,        0, 0, 0,
170 178
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
171
-	{"has_body",         has_body_f,        1, fixup_body_type,
179
+	{"has_body",         has_body_f,        1, fixup_body_type, 0,
172 180
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE},
173
-	{"is_privacy",       is_privacy_f,      1, fixup_privacy,
181
+	{"is_privacy",       is_privacy_f,      1, fixup_privacy, 0,
174 182
 			REQUEST_ROUTE|ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE}, 
175
-	{0,0,0,0,0}
183
+	{0,0,0,0,0,0}
176 184
 };
177 185
 
178 186
 
... ...
@@ -62,9 +62,9 @@ static void mod_destroy(void);
62 62
  * Exported functions
63 63
  */
64 64
 static cmd_export_t cmds[]={
65
-	{"is_peer_verified", is_peer_verified,   0, 0, 
65
+	{"is_peer_verified", is_peer_verified,   0, 0, 0, 
66 66
 			REQUEST_ROUTE},
67
-	{0,0,0,0,0}
67
+	{0,0,0,0,0,0}
68 68
 };
69 69
 
70 70
 /*
... ...
@@ -136,44 +136,44 @@ stat_var *tm_trans_inuse;
136 136
 
137 137
 static cmd_export_t cmds[]={
138 138
 	{"t_newtran",            w_t_newtran,             0, 0,
139
-			REQUEST_ROUTE},
139
+			0, REQUEST_ROUTE},
140 140
 	{"t_reply",              w_t_reply,               2, fixup_t_send_reply,
141
-			REQUEST_ROUTE | FAILURE_ROUTE },
141
+			0, REQUEST_ROUTE | FAILURE_ROUTE },
142 142
 	{"t_release",            w_t_release,             0, 0,
143
-			REQUEST_ROUTE},
143
+			0, REQUEST_ROUTE},
144 144
 	{"t_replicate",          w_t_replicate,           1, fixup_t_replicate,
145
-			REQUEST_ROUTE},
145
+			0, REQUEST_ROUTE},
146 146
 	{"t_replicate",          w_t_replicate,           2, fixup_t_replicate,
147
-			REQUEST_ROUTE},
147
+			0, REQUEST_ROUTE},
148 148
 	{"t_relay",              w_t_relay,               0, 0,
149
-			REQUEST_ROUTE | FAILURE_ROUTE },
149
+			0, REQUEST_ROUTE | FAILURE_ROUTE },
150 150
 	{"t_relay",              w_t_relay,               1, fixup_t_relay1,
151
-			REQUEST_ROUTE | FAILURE_ROUTE },
151
+			0, REQUEST_ROUTE | FAILURE_ROUTE },
152 152
 	{"t_relay",              w_t_relay,               2, fixup_t_relay2,
153
-			REQUEST_ROUTE | FAILURE_ROUTE },
153
+			0, REQUEST_ROUTE | FAILURE_ROUTE },
154 154
 	{"t_on_failure",         w_t_on_negative,         1, fixup_str2int,
155
-			REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
155
+			0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE },
156 156
 	{"t_on_reply",           w_t_on_reply,            1, fixup_str2int,
157