]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
remove a bunch of duplicate includes
authorLuigi Rizzo <rizzo@icir.org>
Fri, 16 Nov 2007 23:54:45 +0000 (23:54 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Fri, 16 Nov 2007 23:54:45 +0000 (23:54 +0000)
Reproduce with

grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

20 files changed:
apps/app_dumpchan.c
apps/app_parkandannounce.c
apps/app_rpt.c
channels/chan_agent.c
channels/chan_features.c
funcs/func_blacklist.c
funcs/func_lock.c
funcs/func_module.c
funcs/func_strings.c
main/asterisk.c
main/logger.c
main/rtp.c
main/udptl.c
pbx/dundi-parser.c
pbx/pbx_dundi.c
pbx/pbx_loopback.c
pbx/pbx_realtime.c
res/res_adsi.c
res/res_agi.c
res/res_features.c

index 156109185cddc063342d6d90f2487654e11679a3..768f3e2db17ba971ea9093287c4ac2430c44261e 100644 (file)
@@ -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";
index c13ea5ad7a369170813e5233579f57eb1bd6355b..9ae1f2e908d14fcde60b37213e771fce7a588e1c 100644 (file)
@@ -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"
index 0b149c68a60797f943f2bf0c6fc832a0e265cb28..e9c9d734b733c4989d1db62a724b2eec3bfc7e5c 100644 (file)
@@ -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>
index 5f6fc2933a2abffb9e01678872f621583a072f6f..cc202a585b140a9052ae1ddd09e2eca79755c4fb 100644 (file)
@@ -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"
index 6bb9bbe4c27a25fa868d2446f5368dc87436c4a2..f1b251fab4bb4eae536c1586209219b4bfa766cf 100644 (file)
@@ -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"
index b0a42a4dbb7889eff5dbae570b1c6f42790ee5e8..331af817552559f2540ec6f31e944946355062d1 100644 (file)
@@ -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)
 {
index 22339969fb1efb643ea76659c0f97f5061f3dab2..4ed1131377484b70bcd61f0eab41bf53b0ecd98d 100644 (file)
@@ -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);
index 8f0521a09f5167c69cb61095102d49da34fd1d23..a745212998cbac156cbd14e499d59e25e1457e9c 100644 (file)
@@ -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)
index ba7075b6e072590c954d02e0a4e5a52778f2e15a..39b402211d8877b157712ee5f262c120e9fb9610 100644 (file)
@@ -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)
index 1f03484d24405038ca846ba44aa42d10ef584b5f..3db9c0ca5ecac1d7e7269dfbce6a6addf9ad8fb5 100644 (file)
@@ -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"
index 83cdef36ac5a0138575bab589030d9ca9928f51b..457c2bd07c62e7da250e803eea2db297ab92179f 100644 (file)
@@ -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)
index a6d9c73620b94bfc1dbc6505e712f35c699ac347..285d67182319d91b9a04a56f6f08a538e2a9e642 100644 (file)
@@ -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
 
index 4b67dc221a0ec9217321a0945cac2967895c0986..9ac5aff5b890161d74ab3d6d6e90f502f5e414a8 100644 (file)
@@ -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
 
index 0d57cf7db80be47b07fb4f230038077a203a4734..bab1bfc91914782ba33d1647a734da94b7569f92 100644 (file)
@@ -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)
 {
index 6f469214d683da493ab20de81e248bbeae0303b6..f2c3be341cb972dc93b5ef05dc22900ff658bf61 100644 (file)
@@ -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"
index 47ac2f856d165a9b5e291d5c4941e9addf8b71ae..404b456b300473a724bc87caa5cc07075790cd0d 100644 (file)
@@ -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"
index 4ef9ea225f4a93762ce4a34056c95cfa230fafc2..12bd08b421195523fc404c7ee4a3ad9309c815af 100644 (file)
@@ -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"
index 6a1cc6066db684a57afccffe86ccb2a8e9f23b2c..5eabbd15f017cb8e4e7af1c8c1cd9ce33eb94415 100644 (file)
@@ -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"
index de84cbee76f08909b3a76fa20abd814fb669eac5..36ad040b3503b90bdd28091c35f05ad3bdf961ee 100644 (file)
@@ -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"
index 4a73cf4512e191bf2d738eb7a23a857408bfe5a6..51c75e1f62424f5c4b9a6c388db0be615ac2053f 100644 (file)
@@ -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';