Bladeren bron

minor macro additions for kamailio compatibility

Andrei Pelinescu-Onciul 17 jaren geleden
bovenliggende
commit
7000945a87
3 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 1 0
      dprint.h
  2. 1 0
      sr_module.h
  3. 2 1
      statistics.h

+ 1 - 0
dprint.h

@@ -87,6 +87,7 @@ int log_facility_fixup(void *handle, str *name, void **val);
 #define LOC_INFO	__FILE__ ":" CT2STR(__LINE__) ": "
 
 
+#define is_printable(level) (cfg_get(core, core_cfg, debug)>=(level))
 
 #ifdef NO_DEBUG
 	#ifdef __SUNPRO_C

+ 1 - 0
sr_module.h

@@ -152,6 +152,7 @@ typedef int (*param_func_t)( modparam_t type, void* val);
 #define BRANCH_ROUTE  8  /* Function can be used in branch_route blocks */
 #define ONSEND_ROUTE 16  /* Function can be used in onsend_route blocks */
 #define ERROR_ROUTE  32  /* Function can be used in an error route */ 
+#define LOCAL_ROUTE  64  /* Function can be used in a local route */
 
 /* Macros - used as rank in child_init function */
 #define PROC_MAIN      0  /* Main ser process */

+ 2 - 1
statistics.h

@@ -61,9 +61,10 @@ typedef struct stat_export_ {
 
 #define get_stat(name)  0
 #define get_stat_val(v) 0
+#define get_stat_var_from_num_code(num_code, in_code) 0
 #define update_stat(v, n)
 #define reset_stat(v)
-#define if_update_stat (cond, v, n)
+#define if_update_stat(cond, v, n)
 
 #ifdef STATISTICS
 #warning "sorry sip-router does not support STATISTICS"