瀏覽代碼

kcore: removed local_route.{c,h} - they are not used

- removed unused code from acc related to local route
Daniel-Constantin Mierla 13 年之前
父節點
當前提交
04979bc60f
共有 3 個文件被更改,包括 0 次插入139 次删除
  1. 0 78
      lib/kcore/local_route.c
  2. 0 42
      lib/kcore/local_route.h
  3. 0 19
      modules_k/acc/acc_mod.c

+ 0 - 78
lib/kcore/local_route.c

@@ -1,78 +0,0 @@
-/*
- *$Id: local_route.c 5132 2008-10-24 11:49:14Z miconda $
- *
- * Copyright (C) 2001-2003 FhG Fokus
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*!
- * \file
- * \brief Local Route related functions.
- */
-
-#include <string.h>
-
-#include "../../dprint.h"
-#include "../../mem/mem.h"
-
-#include "local_route.h"
-
-static lrt_info_t* lrt_info_list = 0;
-static int lrt_info_no = 0;
-
-
-int lrt_do_init_child(void)
-{
-	int i;
-
-	for ( i=0; i< lrt_info_no; i++ )
-	{
-		if ( lrt_info_list[i].init && lrt_info_list[i].init()!=0 )
-		{
-			LM_ERR("failed to init child for local route <%s>\n",
-					 lrt_info_list[i].name);
-			return -1;
-		}
-	}
-	return 0;
-}
-
-int register_lrt_info(lrt_info_t *lrti)
-{
-	lrt_info_t *l;
-
-	if(lrti==NULL || lrti->name==NULL || lrti->init==NULL)
-		return 0;
-
-	l = (lrt_info_t*)pkg_realloc(lrt_info_list,
-			(lrt_info_no+1)*sizeof(lrt_info_t));
-	if (l==0)
-	{
-		LM_ERR("no more pkg memory\n");
-		return -1;
-	}
-
-	lrt_info_list = l;
-	lrt_info_list[lrt_info_no].init = lrti->init;
-	lrt_info_list[lrt_info_no].name = lrti->name;
-	lrt_info_no++;
-
-	return 0;
-}
-
-

+ 0 - 42
lib/kcore/local_route.h

@@ -1,42 +0,0 @@
-/*
- *$Id: local_route.h 5132 2008-10-24 11:49:14Z miconda $
- *
- * Copyright (C) 2001-2003 FhG Fokus
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*!
- * \file
- * \brief Local Route related functions.
- */
-
-#ifndef _LOCAL_ROUTE_H_
-#define _LOCAL_ROUTE_H_
-
-typedef int (lrt_child_init_f)(void);
-
-typedef struct _lrt_info {
-	char *name;
-	lrt_child_init_f *init;
-} lrt_info_t;
-
-int lrt_do_init_child(void);
-int register_lrt_info(lrt_info_t *lrti);
-
-#endif
-

+ 0 - 19
modules_k/acc/acc_mod.c

@@ -63,7 +63,6 @@
 #include <string.h>
 #include <string.h>
 
 
 #include "../../sr_module.h"
 #include "../../sr_module.h"
-#include "../../lib/kcore/local_route.h"
 #include "../../dprint.h"
 #include "../../dprint.h"
 #include "../../mem/mem.h"
 #include "../../mem/mem.h"
 #include "../../modules/tm/tm_load.h"
 #include "../../modules/tm/tm_load.h"
@@ -362,18 +361,6 @@ static int free_acc_fixup(void** param, int param_no)
 
 
 /************************** INTERFACE functions ****************************/
 /************************** INTERFACE functions ****************************/
 
 
-static int mod_lrt_init( void )
-{
-
-#ifdef SQL_ACC
-	if(db_url.s && acc_db_init_child(&db_url)<0) {
-		LM_ERR("could not open database connection");
-		return -1;
-	}
-#endif
-
-	return 0;
-}
 
 
 static int parse_failed_filter(char *s, unsigned short *failed_filter)
 static int parse_failed_filter(char *s, unsigned short *failed_filter)
 {
 {
@@ -416,12 +403,6 @@ static int parse_failed_filter(char *s, unsigned short *failed_filter)
 
 
 static int mod_init( void )
 static int mod_init( void )
 {
 {
-	lrt_info_t li;
-	li.init = mod_lrt_init;
-	li.name = "acc";
-	if(register_lrt_info(&li)!=0)
-		return -1;
-
 #ifdef SQL_ACC
 #ifdef SQL_ACC
 	if (db_url.s) {
 	if (db_url.s) {
 		db_url.len = strlen(db_url.s);
 		db_url.len = strlen(db_url.s);