[svn-commits] rizzo: trunk r89348 - in /trunk: apps/ channels/ funcs/ main/ pbx/ res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Nov 16 17:54:45 CST 2007


Author: rizzo
Date: Fri Nov 16 17:54:45 2007
New Revision: 89348

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89348
Log:
remove a bunch of duplicate includes
Reproduce with

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


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

Modified: trunk/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dumpchan.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/apps/app_dumpchan.c (original)
+++ trunk/apps/app_dumpchan.c Fri Nov 16 17:54:45 2007
@@ -40,7 +40,6 @@
 #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";

Modified: trunk/apps/app_parkandannounce.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_parkandannounce.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/apps/app_parkandannounce.c (original)
+++ trunk/apps/app_parkandannounce.c Fri Nov 16 17:54:45 2007
@@ -40,7 +40,6 @@
 #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"

Modified: trunk/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/apps/app_rpt.c (original)
+++ trunk/apps/app_rpt.c Fri Nov 16 17:54:45 2007
@@ -214,7 +214,6 @@
 #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>

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Fri Nov 16 17:54:45 2007
@@ -50,7 +50,6 @@
 #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"

Modified: trunk/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_features.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/channels/chan_features.c (original)
+++ trunk/channels/chan_features.c Fri Nov 16 17:54:45 2007
@@ -49,7 +49,6 @@
 #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"

Modified: trunk/funcs/func_blacklist.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_blacklist.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/funcs/func_blacklist.c (original)
+++ trunk/funcs/func_blacklist.c Fri Nov 16 17:54:45 2007
@@ -41,7 +41,6 @@
 #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)
 {

Modified: trunk/funcs/func_lock.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_lock.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/funcs/func_lock.c (original)
+++ trunk/funcs/func_lock.c Fri Nov 16 17:54:45 2007
@@ -37,7 +37,6 @@
 #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);

Modified: trunk/funcs/func_module.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_module.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/funcs/func_module.c (original)
+++ trunk/funcs/func_module.c Fri Nov 16 17:54:45 2007
@@ -33,7 +33,6 @@
 #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)

Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Fri Nov 16 17:54:45 2007
@@ -39,7 +39,6 @@
 #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)

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Fri Nov 16 17:54:45 2007
@@ -117,7 +117,6 @@
 #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"

Modified: trunk/main/logger.c
URL: http://svn.digium.com/view/asterisk/trunk/main/logger.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/main/logger.c (original)
+++ trunk/main/logger.c Fri Nov 16 17:54:45 2007
@@ -66,7 +66,6 @@
 #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)

Modified: trunk/main/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/rtp.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/main/rtp.c (original)
+++ trunk/main/rtp.c Fri Nov 16 17:54:45 2007
@@ -34,7 +34,6 @@
 #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 @@
 #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 @@
 #include "asterisk/cli.h"
 #include "asterisk/manager.h"
 #include "asterisk/unaligned.h"
-#include "asterisk/utils.h"
 
 #define MAX_TIMESTAMP_SKEW	640
 

Modified: trunk/main/udptl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/udptl.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/main/udptl.c (original)
+++ trunk/main/udptl.c Fri Nov 16 17:54:45 2007
@@ -54,7 +54,6 @@
 #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 @@
 #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
 

Modified: trunk/pbx/dundi-parser.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/dundi-parser.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/pbx/dundi-parser.c (original)
+++ trunk/pbx/dundi-parser.c Fri Nov 16 17:54:45 2007
@@ -34,7 +34,6 @@
 #include "asterisk/utils.h"
 #include "asterisk/dundi.h"
 #include "dundi-parser.h"
-#include "asterisk/dundi.h"
 
 static void internaloutput(const char *str)
 {

Modified: trunk/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_dundi.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/pbx/pbx_dundi.c (original)
+++ trunk/pbx/pbx_dundi.c Fri Nov 16 17:54:45 2007
@@ -40,7 +40,6 @@
 #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 @@
 #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"

Modified: trunk/pbx/pbx_loopback.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_loopback.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/pbx/pbx_loopback.c (original)
+++ trunk/pbx/pbx_loopback.c Fri Nov 16 17:54:45 2007
@@ -36,7 +36,6 @@
 #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"

Modified: trunk/pbx/pbx_realtime.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx/pbx_realtime.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/pbx/pbx_realtime.c (original)
+++ trunk/pbx/pbx_realtime.c Fri Nov 16 17:54:45 2007
@@ -39,7 +39,6 @@
 #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"

Modified: trunk/res/res_adsi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_adsi.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/res/res_adsi.c (original)
+++ trunk/res/res_adsi.c Fri Nov 16 17:54:45 2007
@@ -45,7 +45,6 @@
 #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"

Modified: trunk/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_agi.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/res/res_agi.c (original)
+++ trunk/res/res_agi.c Fri Nov 16 17:54:45 2007
@@ -48,7 +48,6 @@
 #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"

Modified: trunk/res/res_features.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_features.c?view=diff&rev=89348&r1=89347&r2=89348
==============================================================================
--- trunk/res/res_features.c (original)
+++ trunk/res/res_features.c Fri Nov 16 17:54:45 2007
@@ -2089,11 +2089,12 @@
 				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';




More information about the svn-commits mailing list