Browse code

tm: prefixed t set functions exported to config script

Daniel-Constantin Mierla authored on 08/06/2017 19:51:14
Showing 1 changed files
... ...
@@ -190,14 +190,14 @@ static int w_t_set_retr(struct sip_msg* msg, char* retr_t1, char* retr_t2);
190 190
 static int w_t_reset_retr(struct sip_msg* msg, char* foo, char* bar);
191 191
 static int w_t_set_max_lifetime(struct sip_msg* msg, char* inv, char* noninv);
192 192
 static int w_t_reset_max_lifetime(struct sip_msg* msg, char* foo, char* bar);
193
-static int t_set_auto_inv_100(struct sip_msg* msg, char* on_off, char* foo);
194
-static int t_set_disable_6xx(struct sip_msg* msg, char* on_off, char* foo);
195
-static int t_set_disable_failover(struct sip_msg* msg, char* on_off, char* f);
193
+static int w_t_set_auto_inv_100(struct sip_msg* msg, char* on_off, char* foo);
194
+static int w_t_set_disable_6xx(struct sip_msg* msg, char* on_off, char* foo);
195
+static int w_t_set_disable_failover(struct sip_msg* msg, char* on_off, char* f);
196 196
 #ifdef CANCEL_REASON_SUPPORT
197
-static int t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,
197
+static int w_t_set_no_e2e_cancel_reason(struct sip_msg* msg, char* on_off,
198 198
 		char* f);
199 199
 #endif /* CANCEL_REASON_SUPPORT */
200
-static int t_set_disable_internal_reply(struct sip_msg* msg, char* on_off,
200
+static int w_t_set_disable_internal_reply(struct sip_msg* msg, char* on_off,
201 201
 		char* f);
202 202
 static int w_t_branch_timeout(struct sip_msg* msg, char*, char*);
203 203
 static int w_t_branch_replied(struct sip_msg* msg, char*, char*);
... ...
@@ -358,22 +358,22 @@ static cmd_export_t cmds[]={
358 358
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
359 359
 	{"t_reset_max_lifetime", w_t_reset_max_lifetime, 0, 0,
360 360
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
361
-	{"t_set_auto_inv_100", t_set_auto_inv_100,       1, fixup_var_int_1,
361
+	{"t_set_auto_inv_100", w_t_set_auto_inv_100,     1, fixup_var_int_1,
362 362
 		REQUEST_ROUTE},
363
-	{"t_set_disable_6xx", t_set_disable_6xx,         1, fixup_var_int_1,
363
+	{"t_set_disable_6xx", w_t_set_disable_6xx,       1, fixup_var_int_1,
364 364
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
365
-	{"t_set_disable_failover", t_set_disable_failover, 1, fixup_var_int_1,
365
+	{"t_set_disable_failover", w_t_set_disable_failover, 1, fixup_var_int_1,
366 366
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
367 367
 #ifdef CANCEL_REASON_SUPPORT
368
-	{"t_set_no_e2e_cancel_reason", t_set_no_e2e_cancel_reason, 1,
368
+	{"t_set_no_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
369 369
 		fixup_var_int_1,
370 370
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
371 371
 	/* alias for t_set_no_e2e_cancel_reason */
372
-	{"t_disable_e2e_cancel_reason", t_set_no_e2e_cancel_reason, 1,
372
+	{"t_disable_e2e_cancel_reason", w_t_set_no_e2e_cancel_reason, 1,
373 373
 		fixup_var_int_1,
374 374
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
375 375
 #endif /* CANCEL_REASON_SUPPORT */
376
-	{"t_set_disable_internal_reply", t_set_disable_internal_reply, 1,
376
+	{"t_set_disable_internal_reply", w_t_set_disable_internal_reply, 1,
377 377
 		fixup_var_int_1,
378 378
 		REQUEST_ROUTE|TM_ONREPLY_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE },
379 379
 	{"t_branch_timeout",  w_t_branch_timeout,       0, 0,
... ...
@@ -1808,11 +1808,11 @@ int ki_t_reset_max_lifetime(sip_msg_t* msg)
1808 1808
 
1809 1809
 /**
1810 1810
  * helper macro, builds a function for setting a cell flag from the script.
1811
- * e.g. T_SET_FLAG_GEN_FUNC(t_set_foo, T_FOO) =>
1811
+ * e.g. W_T_SET_FLAG_GEN_FUNC(t_set_foo, T_FOO) =>
1812 1812
  * static int t_set_foo(struct sip_msg* msg, char*, char* )
1813 1813
  * that will expect fparam as first param and will set or reset T_FOO
1814 1814
  * in the current or next to be created transaction. */
1815
-#define T_SET_FLAG_GEN_FUNC(fname, T_FLAG_NAME) \
1815
+#define W_T_SET_FLAG_GEN_FUNC(fname, T_FLAG_NAME) \
1816 1816
 	static int fname(struct sip_msg* msg, char* p1, char* p2) \
1817 1817
 { \
1818 1818
 	int state; \
... ...
@@ -1851,25 +1851,25 @@ int ki_t_reset_max_lifetime(sip_msg_t* msg)
1851 1851
 
1852 1852
 /* set automatically sending 100 replies on/off for the current or
1853 1853
  * next to be created transaction */
1854
-T_SET_FLAG_GEN_FUNC(t_set_auto_inv_100, T_AUTO_INV_100)
1854
+W_T_SET_FLAG_GEN_FUNC(w_t_set_auto_inv_100, T_AUTO_INV_100)
1855 1855
 
1856 1856
 
1857 1857
 /* set 6xx handling for the current or next to be created transaction */
1858
-T_SET_FLAG_GEN_FUNC(t_set_disable_6xx, T_DISABLE_6xx)
1858
+W_T_SET_FLAG_GEN_FUNC(w_t_set_disable_6xx, T_DISABLE_6xx)
1859 1859
 
1860 1860
 
1861 1861
 /* disable dns failover for the current transaction */
1862
-T_SET_FLAG_GEN_FUNC(t_set_disable_failover, T_DISABLE_FAILOVER)
1862
+W_T_SET_FLAG_GEN_FUNC(w_t_set_disable_failover, T_DISABLE_FAILOVER)
1863 1863
 
1864 1864
 
1865 1865
 #ifdef CANCEL_REASON_SUPPORT
1866 1866
 /* disable/enable e2e cancel reason copy for the current transaction */
1867
-T_SET_FLAG_GEN_FUNC(t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
1867
+W_T_SET_FLAG_GEN_FUNC(w_t_set_no_e2e_cancel_reason, T_NO_E2E_CANCEL_REASON)
1868 1868
 #endif /* CANCEL_REASON_SUPPORT */
1869 1869
 
1870 1870
 
1871 1871
 /* disable internal negative reply for the current transaction */
1872
-T_SET_FLAG_GEN_FUNC(t_set_disable_internal_reply, T_DISABLE_INTERNAL_REPLY)
1872
+W_T_SET_FLAG_GEN_FUNC(w_t_set_disable_internal_reply, T_DISABLE_INTERNAL_REPLY)
1873 1873
 
1874 1874
 
1875 1875
 /* FAILURE_ROUTE and BRANCH_FAILURE_ROUTE only,
... ...
@@ -2373,17 +2373,17 @@ inline static int w_t_relay_to(struct sip_msg *msg, char *proxy, char *flags)
2373 2373
 		/* no auto 100 trying */
2374 2374
 		if(fl&1) {
2375 2375
 			param.v.i = 0;
2376
-			t_set_auto_inv_100(msg, (char*)(&param), 0);
2376
+			w_t_set_auto_inv_100(msg, (char*)(&param), 0);
2377 2377
 		}
2378 2378
 		/* no auto negative reply */
2379 2379
 		if(fl&2) {
2380 2380
 			param.v.i = 1;
2381
-			t_set_disable_internal_reply(msg, (char*)(&param), 0);
2381
+			w_t_set_disable_internal_reply(msg, (char*)(&param), 0);
2382 2382
 		}
2383 2383
 		/* no dns failover */
2384 2384
 		if(fl&4) {
2385 2385
 			param.v.i = 1;
2386
-			t_set_disable_failover(msg, (char*)(&param), 0);
2386
+			w_t_set_disable_failover(msg, (char*)(&param), 0);
2387 2387
 		}
2388 2388
 	}
2389 2389
 	return _w_t_relay_to(msg, px, PROTO_NONE);