Просмотр исходного кода

Merge pull request #1076 from mslehto/deadcode

core: dead code and ser string removal
Daniel-Constantin Mierla 8 лет назад
Родитель
Сommit
c13ffc886f
6 измененных файлов с 1 добавлено и 55 удалено
  1. 0 2
      src/core/config.h
  2. 0 13
      src/core/globals.h
  3. 1 1
      src/core/route.c
  4. 0 32
      src/core/types.h
  5. 0 6
      src/main.c
  6. 0 1
      src/modules/tm/h_table.h

+ 0 - 2
src/core/config.h

@@ -35,8 +35,6 @@
 #ifndef config_h
 #define config_h
 
-#include "types.h"
-
 #define SIP_PORT  5060 /*!< default SIP port if none specified */
 #define SIPS_PORT 5061 /*!< default SIP port for TLS if none specified */
 

+ 0 - 13
src/core/globals.h

@@ -32,7 +32,6 @@
 #ifndef globals_h
 #define globals_h
 
-#include "types.h"
 #include "ip_addr.h"
 #include "str.h"
 #include "poll_types.h"
@@ -113,7 +112,6 @@ extern int dont_daemonize;
 extern int check_via;
 extern int phone2tel;
 extern int received_dns;
-/* extern int process_no; */
 extern int child_rank;
 extern int sip_warning;
 extern int server_signature;
@@ -144,12 +142,6 @@ extern int auto_bind_ipv6;
 extern int tos;
 extern int pmtu_discovery;
 
-/*
- * debug & log_stderr moved to dprint.h*/
-
-/* extern process_bm_t process_bit; */
-/* extern int *pids; -moved to pt.h */
-
 extern int cfg_errors;
 extern int cfg_warnings;
 extern unsigned int msg_no;
@@ -160,11 +152,6 @@ extern unsigned long pkg_mem_size;
 /* AVP configuration */
 extern char *avp_db_url;  /* db url used by user preferences (AVPs) */
 
-/* moved to pt.h
-extern int *pids;
-extern int process_no;
-*/
-
 extern int reply_to_via;
 
 extern int is_main;

+ 1 - 1
src/core/route.c

@@ -993,7 +993,7 @@ int fix_actions(struct action* a)
 				si=find_si(&ip, ((struct socket_id*)t->val[0].u.data)->port,
 								((struct socket_id*)t->val[0].u.data)->proto);
 				if (si==0){
-					LM_ERR("bad force_send_socket argument: %s:%d (ser doesn't listen on it)\n",
+					LM_ERR("bad force_send_socket argument: %s:%d (" NAME " doesn't listen on it)\n",
 						((struct socket_id*)t->val[0].u.data)->addr_lst->name,
 							((struct socket_id*)t->val[0].u.data)->port);
 					ret = E_BAD_ADDRESS;

+ 0 - 32
src/core/types.h

@@ -1,32 +0,0 @@
-/*
- * 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
- *
- * For a license to use the Kamailio software under conditions
- * other than those described here, or to purchase support for this
- * software, please contact iptel.org by e-mail at the following addresses:
- *    [email protected]
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-
-#ifndef _TYPES_H_
-#define _TYPES_H_
-
-typedef unsigned int process_bm_t;
-
-#endif

+ 0 - 6
src/main.c

@@ -471,10 +471,6 @@ int child_rank = 0;
 /* how much to wait for children to terminate, before taking extreme measures*/
 int ser_kill_timeout=DEFAULT_SER_KILL_TIMEOUT;
 
-/* process_bm_t process_bit = 0; */
-#ifdef ROUTE_SRV
-#endif
-
 /* cfg parsing */
 int cfg_errors=0;
 int cfg_warnings=0;
@@ -1364,7 +1360,6 @@ int main_loop(void)
 				if (pid==0){
 					/* child */
 					/* timer!*/
-					/* process_bit = 0; */
 					if (real_time&2)
 						set_rt_prio(rt_timer2_prio, rt_timer2_policy);
 
@@ -1383,7 +1378,6 @@ int main_loop(void)
 				if (pid==0){
 					/* child */
 					/* timer!*/
-					/* process_bit = 0; */
 					if (real_time&1)
 						set_rt_prio(rt_timer1_prio, rt_timer1_policy);
 					if (arm_timer()<0) goto error;

+ 0 - 1
src/modules/tm/h_table.h

@@ -46,7 +46,6 @@
 
 #include "../../core/clist.h"
 #include "../../core/parser/msg_parser.h"
-#include "../../core/types.h"
 #include "../../core/md5utils.h"
 #include "../../core/usr_avp.h"
 #ifdef WITH_XAVP