[sr-dev] git:rbetancor/drouting: drouting: Module for more flexible dynamic routing rules

Raul Alexis Betancor Santana rabs at dimension-virtual.com
Thu Jul 2 19:51:59 CEST 2009


Module: sip-router
Branch: rbetancor/drouting
Commit: e90d502b2620391047b04c670c6c408b75d362f6
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e90d502b2620391047b04c670c6c408b75d362f6

Author: Raul Alexis Betancor Santana <rabs at dimension-virtual.com>
Committer: Raul Alexis Betancor Santana <rabs at dimension-virtual.com>
Date:   Thu Jul  2 15:42:11 2009 +0100

drouting: Module for more flexible dynamic routing rules

- disabled blacklisting support till reviewed sr bl support

---

 modules_k/drouting/dr_bl.c |   32 ++++++++++++++++----------------
 modules_k/drouting/dr_bl.h |    2 +-
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules_k/drouting/dr_bl.c b/modules_k/drouting/dr_bl.c
index ebc14c3..3e38585 100644
--- a/modules_k/drouting/dr_bl.c
+++ b/modules_k/drouting/dr_bl.c
@@ -125,12 +125,12 @@ int init_dr_bls(void)
 		bl_lists[i] = NULL;
 
 		/* create backlist for it */
-		drbl->bl = create_bl_head( 131313, 0/*flags*/, NULL, NULL, &name);
-		if (drbl->bl==NULL) {
-			LM_ERR("failed to create bl <%.*s>\n",name.len,name.s);
-			shm_free(drbl);
-			return -1;
-		}
+		//drbl->bl = create_bl_head( 131313, 0/*flags*/, NULL, NULL, &name);
+		//if (drbl->bl==NULL) {
+		//	LM_ERR("failed to create bl <%.*s>\n",name.len,name.s);
+		//	shm_free(drbl);
+		//	return -1;
+		//}
 
 		/* link it */
 		drbl->next = drbl_lists;
@@ -181,21 +181,21 @@ int populate_dr_bls(pgw_addr_t *pgwa)
 						continue;
 					}
 					/* add this destination to the BL */
-					add_rule_to_list( &drbl_first, &drbl_last,
-						gw_net,
-						NULL/*body*/,
-						0/*port*/,
-						PROTO_NONE/*proto*/,
-						0/*flags*/);
+					//add_rule_to_list( &drbl_first, &drbl_last,
+					//	gw_net,
+					//	NULL/*body*/,
+					//	0/*port*/,
+					//	PROTO_NONE/*proto*/,
+					//	0/*flags*/);
 					pkg_free(gw_net);
 				}
 			}
 		}
 		/* the new content for the BL */
-		if (add_list_to_head( drbl->bl, drbl_first, drbl_last, 1, 0)!=0) {
-			LM_ERR("failed to update bl\n");
-			return -1;
-		}
+		//if (add_list_to_head( drbl->bl, drbl_first, drbl_last, 1, 0)!=0) {
+		//	LM_ERR("failed to update bl\n");
+		//	return -1;
+		//}
 	}
 
 	return 0;
diff --git a/modules_k/drouting/dr_bl.h b/modules_k/drouting/dr_bl.h
index b9bc11b..e9547b0 100644
--- a/modules_k/drouting/dr_bl.h
+++ b/modules_k/drouting/dr_bl.h
@@ -29,7 +29,7 @@
 #define _DR_DR_BL_H
 
 #include "../../sr_module.h"
-#include "../../blacklists.h"
+//#include "../../blacklists.h"
 #include "prefix_tree.h"
 
 #define MAX_TYPES_PER_BL 32




More information about the sr-dev mailing list