aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 23:54:45 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-16 23:54:45 +0000
commit18911d90cb6a2b3859a90240c5a56dff81a88446 (patch)
tree99addf8c7bece06c188957346b0489ec30f09859
parent27db72c0de1c905ace077e22e86b4d80e6a135df (diff)
remove a bunch of duplicate includes
Reproduce with grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_dumpchan.c1
-rw-r--r--apps/app_parkandannounce.c1
-rw-r--r--apps/app_rpt.c1
-rw-r--r--channels/chan_agent.c1
-rw-r--r--channels/chan_features.c1
-rw-r--r--funcs/func_blacklist.c1
-rw-r--r--funcs/func_lock.c1
-rw-r--r--funcs/func_module.c1
-rw-r--r--funcs/func_strings.c1
-rw-r--r--main/asterisk.c1
-rw-r--r--main/logger.c1
-rw-r--r--main/rtp.c3
-rw-r--r--main/udptl.c3
-rw-r--r--pbx/dundi-parser.c1
-rw-r--r--pbx/pbx_dundi.c2
-rw-r--r--pbx/pbx_loopback.c1
-rw-r--r--pbx/pbx_realtime.c1
-rw-r--r--res/res_adsi.c1
-rw-r--r--res/res_agi.c1
-rw-r--r--res/res_features.c5
20 files changed, 3 insertions, 26 deletions
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index 156109185..768f3e2db 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -40,7 +40,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
-#include "asterisk/utils.h"
static char *app = "DumpChan";
static char *synopsis = "Dump Info About The Calling Channel";
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index c13ea5ad7..9ae1f2e90 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -40,7 +40,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/features.h"
#include "asterisk/options.h"
-#include "asterisk/logger.h"
#include "asterisk/say.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 0b149c68a..e9c9d734b 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -214,7 +214,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <errno.h>
#include <dirent.h>
#include <ctype.h>
-#include <sys/stat.h>
#include <sys/time.h>
#include <sys/file.h>
#include <sys/ioctl.h>
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 5f6fc2933..cc202a585 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -50,7 +50,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/options.h"
-#include "asterisk/lock.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/rtp.h"
diff --git a/channels/chan_features.c b/channels/chan_features.c
index 6bb9bbe4c..f1b251fab 100644
--- a/channels/chan_features.c
+++ b/channels/chan_features.c
@@ -49,7 +49,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/options.h"
-#include "asterisk/lock.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/rtp.h"
diff --git a/funcs/func_blacklist.c b/funcs/func_blacklist.c
index b0a42a4db..331af8175 100644
--- a/funcs/func_blacklist.c
+++ b/funcs/func_blacklist.c
@@ -41,7 +41,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/image.h"
#include "asterisk/callerid.h"
#include "asterisk/astdb.h"
-#include "asterisk/options.h"
static int blacklist_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
diff --git a/funcs/func_lock.c b/funcs/func_lock.c
index 22339969f..4ed113137 100644
--- a/funcs/func_lock.c
+++ b/funcs/func_lock.c
@@ -37,7 +37,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
-#include "asterisk/options.h"
#include "asterisk/linkedlists.h"
AST_LIST_HEAD_STATIC(locklist, lock_frame);
diff --git a/funcs/func_module.c b/funcs/func_module.c
index 8f0521a09..a74521299 100644
--- a/funcs/func_module.c
+++ b/funcs/func_module.c
@@ -33,7 +33,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
-#include "asterisk/module.h"
static int ifmodule_read(struct ast_channel *chan, const char *cmd, char *data,
char *buf, size_t len)
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index ba7075b6e..39b402211 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -39,7 +39,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/localtime.h"
-#include "asterisk/options.h"
static int function_fieldqty(struct ast_channel *chan, const char *cmd,
char *parse, char *buf, size_t len)
diff --git a/main/asterisk.c b/main/asterisk.c
index 1f03484d2..3db9c0ca5 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -117,7 +117,6 @@ int daemon(int, int); /* defined in libresolv of all places */
#include "asterisk/utils.h"
#include "asterisk/file.h"
#include "asterisk/io.h"
-#include "asterisk/lock.h"
#include "editline/histedit.h"
#include "asterisk/config.h"
#include "asterisk/version.h"
diff --git a/main/logger.c b/main/logger.c
index 83cdef36a..457c2bd07 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -66,7 +66,6 @@ static int syslog_level_map[] = {
#include "asterisk/manager.h"
#include "asterisk/threadstorage.h"
#include "asterisk/strings.h"
-#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#if defined(__linux__) && !defined(__NR_gettid)
diff --git a/main/rtp.c b/main/rtp.c
index a6d9c7362..285d67182 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -34,7 +34,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <signal.h>
#include <errno.h>
#include <netinet/in.h>
-#include <sys/time.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <fcntl.h>
@@ -45,7 +44,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/acl.h"
-#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
@@ -53,7 +51,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cli.h"
#include "asterisk/manager.h"
#include "asterisk/unaligned.h"
-#include "asterisk/utils.h"
#define MAX_TIMESTAMP_SKEW 640
diff --git a/main/udptl.c b/main/udptl.c
index 4b67dc221..9ac5aff5b 100644
--- a/main/udptl.c
+++ b/main/udptl.c
@@ -54,7 +54,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <signal.h>
#include <errno.h>
#include <netinet/in.h>
-#include <sys/time.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <fcntl.h>
@@ -65,14 +64,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/options.h"
#include "asterisk/channel.h"
#include "asterisk/acl.h"
-#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include "asterisk/netsock.h"
#include "asterisk/cli.h"
#include "asterisk/unaligned.h"
-#include "asterisk/utils.h"
#define UDPTL_MTU 1200
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 0d57cf7db..bab1bfc91 100644
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -34,7 +34,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/dundi.h"
#include "dundi-parser.h"
-#include "asterisk/dundi.h"
static void internaloutput(const char *str)
{
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 6f469214d..f2c3be341 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -40,7 +40,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#endif
#include <netinet/ip.h>
#include <sys/ioctl.h>
-#include <netinet/in.h>
#include <net/if.h>
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
#include <net/if_dl.h>
@@ -58,7 +57,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/frame.h"
-#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
#include "asterisk/md5.h"
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index 47ac2f856..404b456b3 100644
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -36,7 +36,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/frame.h"
-#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
#include "asterisk/md5.h"
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index 4ef9ea225..12bd08b42 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -39,7 +39,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/frame.h"
#include "asterisk/term.h"
#include "asterisk/manager.h"
-#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
#include "asterisk/md5.h"
diff --git a/res/res_adsi.c b/res/res_adsi.c
index 6a1cc6066..5eabbd15f 100644
--- a/res/res_adsi.c
+++ b/res/res_adsi.c
@@ -45,7 +45,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/fskmodem.h"
#include "asterisk/channel.h"
-#include "asterisk/adsi.h"
#include "asterisk/module.h"
#include "asterisk/config.h"
#include "asterisk/file.h"
diff --git a/res/res_agi.c b/res/res_agi.c
index de84cbee7..36ad040b3 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -48,7 +48,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/astdb.h"
#include "asterisk/callerid.h"
#include "asterisk/cli.h"
-#include "asterisk/logger.h"
#include "asterisk/options.h"
#include "asterisk/image.h"
#include "asterisk/say.h"
diff --git a/res/res_features.c b/res/res_features.c
index 4a73cf451..51c75e1f6 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -2089,11 +2089,12 @@ static void *do_parking_thread(void *ignore)
if (pu->peername[0]) {
char *peername = ast_strdupa(pu->peername);
char *cp = strrchr(peername, '-');
+ char peername_flat[AST_MAX_EXTENSION]; /* using something like Zap/52 for an extension name is NOT a good idea */
+ int i;
+
if (cp)
*cp = 0;
- char peername_flat[AST_MAX_EXTENSION]; /* using something like Zap/52 for an extension name is NOT a good idea */
ast_copy_string(peername_flat,peername,sizeof(peername_flat));
- int i;
for(i=0; peername_flat[i] && i < AST_MAX_EXTENSION; i++) {
if (peername_flat[i] == '/')
peername_flat[i]= '0';