Browse Source

- rmode variable is accessible through tm_binds. This allows script
functions to find out the type of the route block they are running
within.

Jan Janak 20 years ago
parent
commit
2637cbf160
2 changed files with 4 additions and 0 deletions
  1. 2 0
      modules/tm/tm_load.c
  2. 2 0
      modules/tm/tm_load.h

+ 2 - 0
modules/tm/tm_load.c

@@ -140,5 +140,7 @@ int load_tm( struct tm_binds *tmb)
 		LOG( L_ERR, LOAD_ERROR "'" T_GETT "' not found\n");
 		return -1;
 	}
+
+	tmb->route_mode = &rmode;
 	return 1;
 }

+ 2 - 0
modules/tm/tm_load.h

@@ -44,6 +44,7 @@
 #include "t_fwd.h"
 #include "t_reply.h"
 #include "t_lookup.h"
+#include "t_reply.h"
 #include "dlg.h"
 
 /* export not usable from scripts */
@@ -97,6 +98,7 @@ struct tm_binds {
 	free_dlg_f         free_dlg;
 	print_dlg_f        print_dlg;
 	tgett_f            t_gett;
+	enum route_mode*   route_mode;
 };