From 102ef546ee418fcc92eaa8fe16c3a4fd453036c0 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Tue, 18 Apr 2017 19:27:56 +0300 Subject: [PATCH 1/2] core: substitute ser string with NAME macro --- src/core/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/route.c b/src/core/route.c index 97df31e149a..63e4f83c289 100644 --- a/src/core/route.c +++ b/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; From 0df66ff94a9ccef4fe072f8704dc47f4f790cda4 Mon Sep 17 00:00:00 2001 From: Mikko Lehto Date: Tue, 18 Apr 2017 20:36:54 +0300 Subject: [PATCH 2/2] core: remove dead code --- src/core/config.h | 2 -- src/core/globals.h | 13 ------------- src/core/types.h | 32 -------------------------------- src/main.c | 6 ------ src/modules/tm/h_table.h | 1 - 5 files changed, 54 deletions(-) delete mode 100644 src/core/types.h diff --git a/src/core/config.h b/src/core/config.h index 66ba0df584b..91d15fa3351 100644 --- a/src/core/config.h +++ b/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 */ diff --git a/src/core/globals.h b/src/core/globals.h index 1fb93f1c926..fc5f2c9465e 100644 --- a/src/core/globals.h +++ b/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; diff --git a/src/core/types.h b/src/core/types.h deleted file mode 100644 index eba0e92f442..00000000000 --- a/src/core/types.h +++ /dev/null @@ -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: - * info@iptel.org - * - * 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 diff --git a/src/main.c b/src/main.c index 99feebbdf95..7781901d07f 100644 --- a/src/main.c +++ b/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; diff --git a/src/modules/tm/h_table.h b/src/modules/tm/h_table.h index 7783446ebed..904709579af 100644 --- a/src/modules/tm/h_table.h +++ b/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