aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xacl.c2
-rwxr-xr-xalaw.c2
-rwxr-xr-xapp.c2
-rwxr-xr-xasterisk.c2
-rwxr-xr-xautoservice.c2
-rwxr-xr-xcallerid.c2
-rwxr-xr-xcdr.c2
-rwxr-xr-xcdr/cdr_csv.c2
-rwxr-xr-xcdr/cdr_custom.c2
-rwxr-xr-xcdr/cdr_manager.c2
-rwxr-xr-xcdr/cdr_odbc.c2
-rwxr-xr-xcdr/cdr_pgsql.c2
-rwxr-xr-xchannel.c2
-rwxr-xr-xchannels/chan_agent.c2
-rwxr-xr-xchannels/chan_alsa.c2
-rwxr-xr-xchannels/chan_features.c2
-rwxr-xr-xchannels/chan_iax2.c2
-rwxr-xr-xchannels/chan_local.c2
-rwxr-xr-xchannels/chan_mgcp.c2
-rwxr-xr-xchannels/chan_modem.c2
-rwxr-xr-xchannels/chan_modem_aopen.c2
-rwxr-xr-xchannels/chan_modem_bestdata.c2
-rwxr-xr-xchannels/chan_modem_i4l.c2
-rwxr-xr-xchannels/chan_oss.c2
-rwxr-xr-xchannels/chan_phone.c2
-rwxr-xr-xchannels/chan_sip.c2
-rwxr-xr-xchannels/chan_skinny.c2
-rwxr-xr-xchannels/chan_zap.c2
-rwxr-xr-xchannels/iax2-parser.c2
-rwxr-xr-xchannels/iax2-provision.c2
-rwxr-xr-xchanvars.c2
-rwxr-xr-xcli.c2
-rwxr-xr-xcodecs/codec_a_mu.c17
-rwxr-xr-xcodecs/codec_adpcm.c17
-rwxr-xr-xcodecs/codec_alaw.c17
-rwxr-xr-xcodecs/codec_g723_1.c15
-rwxr-xr-xcodecs/codec_g726.c17
-rwxr-xr-xcodecs/codec_gsm.c17
-rwxr-xr-xcodecs/codec_ilbc.c15
-rwxr-xr-xcodecs/codec_lpc10.c16
-rwxr-xr-xcodecs/codec_speex.c20
-rwxr-xr-xcodecs/codec_ulaw.c17
-rwxr-xr-xconfig.c2
-rwxr-xr-xconfig_old.c2
-rwxr-xr-xdb.c2
-rwxr-xr-xdns.c2
-rwxr-xr-xdnsmgr.c2
-rwxr-xr-xdsp.c2
-rwxr-xr-xenum.c2
-rwxr-xr-xfile.c2
-rwxr-xr-xformats/format_au.c5
-rwxr-xr-xformats/format_g723.c18
-rwxr-xr-xformats/format_g726.c21
-rwxr-xr-xformats/format_g729.c19
-rwxr-xr-xformats/format_gsm.c20
-rwxr-xr-xformats/format_h263.c19
-rwxr-xr-xformats/format_ilbc.c19
-rwxr-xr-xformats/format_jpeg.c20
-rwxr-xr-xformats/format_pcm.c19
-rwxr-xr-xformats/format_pcm_alaw.c19
-rwxr-xr-xformats/format_sln.c19
-rwxr-xr-xformats/format_vox.c19
-rwxr-xr-xformats/format_wav.c19
-rwxr-xr-xformats/format_wav_gsm.c20
-rwxr-xr-xframe.c2
-rwxr-xr-xfskmodem.c2
-rwxr-xr-xfuncs/func_callerid.c4
-rwxr-xr-xfuncs/func_cdr.c4
-rwxr-xr-xfuncs/func_db.c4
-rwxr-xr-xfuncs/func_env.c4
-rwxr-xr-xfuncs/func_groupcount.c4
-rwxr-xr-xfuncs/func_language.c4
-rwxr-xr-xfuncs/func_logic.c4
-rwxr-xr-xfuncs/func_md5.c4
-rwxr-xr-xfuncs/func_strings.c4
-rwxr-xr-xfuncs/func_timeout.c4
-rwxr-xr-xfuncs/pbx_functions.c2
-rwxr-xr-ximage.c2
-rwxr-xr-xinclude/asterisk.h6
-rwxr-xr-xindications.c2
-rwxr-xr-xio.c2
-rwxr-xr-xjitterbuf.c2
-rwxr-xr-xloader.c2
-rwxr-xr-xlogger.c2
-rwxr-xr-xmanager.c2
-rwxr-xr-xmd5.c2
-rwxr-xr-xpbx.c2
-rwxr-xr-xpbx/dundi-parser.c9
-rwxr-xr-xpbx/pbx_config.c17
-rwxr-xr-xpbx/pbx_dundi.c45
-rwxr-xr-xpbx/pbx_gtkconsole.c20
-rwxr-xr-xpbx/pbx_loopback.c14
-rwxr-xr-xpbx/pbx_realtime.c14
-rwxr-xr-xpbx/pbx_spool.c22
-rwxr-xr-xplc.c2
-rwxr-xr-xprivacy.c2
-rwxr-xr-xres/res_adsi.c5
-rwxr-xr-xres/res_agi.c20
-rwxr-xr-xres/res_config_odbc.c11
-rwxr-xr-xres/res_crypto.c22
-rwxr-xr-xres/res_features.c25
-rwxr-xr-xres/res_indications.c5
-rwxr-xr-xres/res_monitor.c17
-rwxr-xr-xres/res_musiconhold.c32
-rwxr-xr-xres/res_odbc.c11
-rwxr-xr-xres/res_osp.c28
-rwxr-xr-xrtp.c2
-rwxr-xr-xsay.c2
-rwxr-xr-xsched.c2
-rwxr-xr-xsrv.c2
-rwxr-xr-xtdd.c2
-rwxr-xr-xterm.c2
-rwxr-xr-xtranslate.c2
-rwxr-xr-xulaw.c2
-rwxr-xr-xutils.c2
115 files changed, 578 insertions, 335 deletions
diff --git a/acl.c b/acl.c
index b66eeab0f..a22f45621 100755
--- a/acl.c
+++ b/acl.c
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/acl.h"
#include "asterisk/logger.h"
diff --git a/alaw.c b/alaw.c
index 6fd99713d..89ecfdca7 100755
--- a/alaw.c
+++ b/alaw.c
@@ -13,7 +13,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/alaw.h"
diff --git a/app.c b/app.c
index 4b99456fb..bb21be9e8 100755
--- a/app.c
+++ b/app.c
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
diff --git a/asterisk.c b/asterisk.c
index 00a1b509a..19534eaed 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -36,7 +36,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/options.h"
diff --git a/autoservice.c b/autoservice.c
index 1a655a790..21bc44db3 100755
--- a/autoservice.c
+++ b/autoservice.c
@@ -22,7 +22,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/frame.h"
diff --git a/callerid.c b/callerid.c
index d51721d48..79fde4d89 100755
--- a/callerid.c
+++ b/callerid.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/ulaw.h"
#include "asterisk/alaw.h"
diff --git a/cdr.c b/cdr.c
index 919b6e402..4b277a412 100755
--- a/cdr.c
+++ b/cdr.c
@@ -22,7 +22,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c
index ec995a675..bcf20fead 100755
--- a/cdr/cdr_csv.c
+++ b/cdr/cdr_csv.c
@@ -18,7 +18,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c
index e524d71c3..d35e3eef2 100755
--- a/cdr/cdr_custom.c
+++ b/cdr/cdr_custom.c
@@ -18,7 +18,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c
index c529d05e1..3aa9afdc0 100755
--- a/cdr/cdr_manager.c
+++ b/cdr/cdr_manager.c
@@ -15,7 +15,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/cdr.h"
diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c
index feed26a18..78971d4d0 100755
--- a/cdr/cdr_odbc.c
+++ b/cdr/cdr_odbc.c
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/options.h"
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c
index 7039e72cc..99828ea30 100755
--- a/cdr/cdr_pgsql.c
+++ b/cdr/cdr_pgsql.c
@@ -26,7 +26,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/options.h"
diff --git a/channel.c b/channel.c
index b8e042dd4..b0a4b2c3c 100755
--- a/channel.c
+++ b/channel.c
@@ -34,7 +34,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/pbx.h"
#include "asterisk/frame.h"
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 102afb0f9..10fec951f 100755
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index 9f8342920..bae02ea73 100755
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/frame.h"
#include "asterisk/logger.h"
diff --git a/channels/chan_features.c b/channels/chan_features.c
index 03bdba706..f7505d30b 100755
--- a/channels/chan_features.c
+++ b/channels/chan_features.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index abb9ef256..8c1b9c816 100755
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -13,7 +13,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/frame.h"
diff --git a/channels/chan_local.c b/channels/chan_local.c
index e2e54f86c..8804b6a53 100755
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 843af438d..6382b8bb5 100755
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -72,7 +72,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_modem.c b/channels/chan_modem.c
index c1e61a0bc..0b2e10d09 100755
--- a/channels/chan_modem.c
+++ b/channels/chan_modem.c
@@ -28,7 +28,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_modem_aopen.c b/channels/chan_modem_aopen.c
index ec6a35fca..f18ded9fc 100755
--- a/channels/chan_modem_aopen.c
+++ b/channels/chan_modem_aopen.c
@@ -19,7 +19,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/vmodem.h"
diff --git a/channels/chan_modem_bestdata.c b/channels/chan_modem_bestdata.c
index f1f6a90c9..5746b2aa4 100755
--- a/channels/chan_modem_bestdata.c
+++ b/channels/chan_modem_bestdata.c
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/vmodem.h"
diff --git a/channels/chan_modem_i4l.c b/channels/chan_modem_i4l.c
index 92cca420a..7d3761c2c 100755
--- a/channels/chan_modem_i4l.c
+++ b/channels/chan_modem_i4l.c
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/vmodem.h"
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 2d1344645..ff4e10f27 100755
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -34,7 +34,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/frame.h"
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 513be4e38..327f25d36 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f677d839b..4dfc802f3 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index e5fd4c92d..588b0b925 100755
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -32,7 +32,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index bd72c7181..1fa4d4a8e 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -41,7 +41,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c
index dddf1349b..2853c768e 100755
--- a/channels/iax2-parser.c
+++ b/channels/iax2-parser.c
@@ -18,7 +18,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/frame.h"
#include "asterisk/utils.h"
diff --git a/channels/iax2-provision.c b/channels/iax2-provision.c
index 143c1b521..03f63c8f0 100755
--- a/channels/iax2-provision.c
+++ b/channels/iax2-provision.c
@@ -14,7 +14,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/logger.h"
diff --git a/chanvars.c b/chanvars.c
index fe4cc1564..7cd32cc18 100755
--- a/chanvars.c
+++ b/chanvars.c
@@ -16,7 +16,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/chanvars.h"
#include "asterisk/logger.h"
diff --git a/cli.c b/cli.c
index c844da82a..0a05489ab 100755
--- a/cli.c
+++ b/cli.c
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/options.h"
diff --git a/codecs/codec_a_mu.c b/codecs/codec_a_mu.c
index 772d8eb62..475446046 100755
--- a/codecs/codec_a_mu.c
+++ b/codecs/codec_a_mu.c
@@ -10,6 +10,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
@@ -17,12 +28,6 @@
#include "asterisk/channel.h"
#include "asterisk/alaw.h"
#include "asterisk/ulaw.h"
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#define BUFFER_SIZE 8096 /* size for the translation buffers */
diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c
index 55a0cca75..76423066b 100755
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -14,6 +14,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
@@ -21,12 +32,6 @@
#include "asterisk/options.h"
#include "asterisk/translate.h"
#include "asterisk/channel.h"
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
/* define NOT_BLI to use a faster but not bit-level identical version */
/* #define NOT_BLI */
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c
index bd1bdea72..31333bd39 100755
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -10,6 +10,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
@@ -18,12 +29,6 @@
#include "asterisk/translate.h"
#include "asterisk/channel.h"
#include "asterisk/alaw.h"
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#define BUFFER_SIZE 8096 /* size for the translation buffers */
diff --git a/codecs/codec_g723_1.c b/codecs/codec_g723_1.c
index 862443900..5cabede8a 100755
--- a/codecs/codec_g723_1.c
+++ b/codecs/codec_g723_1.c
@@ -22,11 +22,6 @@
#define TYPE_MASK 0x3
#include <sys/types.h>
-#include "asterisk/lock.h"
-#include "asterisk/translate.h"
-#include "asterisk/module.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
@@ -34,6 +29,16 @@
#include <string.h>
#include <stdio.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION("$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/translate.h"
+#include "asterisk/module.h"
+#include "asterisk/logger.h"
+#include "asterisk/channel.h"
+
#ifdef ANNEX_B
#include "g723.1b/typedef2.h"
#include "g723.1b/cst2.h"
diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c
index a0d9d9447..a058e1219 100755
--- a/codecs/codec_g726.c
+++ b/codecs/codec_g726.c
@@ -13,6 +13,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
@@ -20,12 +31,6 @@
#include "asterisk/options.h"
#include "asterisk/translate.h"
#include "asterisk/channel.h"
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#define WANT_ASM
#include "log2comp.h"
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index 80cb8e947..12b730625 100755
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -14,6 +14,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/translate.h"
#include "asterisk/config.h"
@@ -21,12 +32,6 @@
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <stdio.h>
#include "gsm/inc/gsm.h"
#include "../formats/msgsm.h"
diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
index 503e3c784..c9f8102d7 100755
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -13,11 +13,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/translate.h"
-#include "asterisk/module.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
@@ -25,6 +20,16 @@
#include <string.h>
#include <stdio.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/translate.h"
+#include "asterisk/module.h"
+#include "asterisk/logger.h"
+#include "asterisk/channel.h"
+
#include "ilbc/iLBC_encode.h"
#include "ilbc/iLBC_decode.h"
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index 9b4cb68bf..46093b51f 100755
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -16,6 +16,16 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/translate.h"
@@ -24,12 +34,6 @@
#include "asterisk/module.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <stdio.h>
#include "lpc10/lpc10.h"
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index e7dd94cca..c067283b8 100755
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -14,6 +14,14 @@
* hacked to be configurable by anthm and bkw 9/28/2004
*/
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <netinet/in.h>
+#include <string.h>
+#include <stdio.h>
+#include <speex.h>
+
static int quality = 8;
static int complexity = 2;
static int enhancement = 0;
@@ -28,6 +36,10 @@ static int dtx = 0;
#define TYPE_LOW 0x1
#define TYPE_MASK 0x3
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION("$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/translate.h"
#include "asterisk/module.h"
@@ -35,14 +47,6 @@ static int dtx = 0;
#include "asterisk/options.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <speex.h>
/* Sample frame data */
#include "slin_speex_ex.h"
diff --git a/codecs/codec_ulaw.c b/codecs/codec_ulaw.c
index 0dffe95c4..8ab3a2cad 100755
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -10,6 +10,17 @@
* the GNU General Public License
*/
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
@@ -18,12 +29,6 @@
#include "asterisk/translate.h"
#include "asterisk/channel.h"
#include "asterisk/ulaw.h"
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#define BUFFER_SIZE 8096 /* size for the translation buffers */
diff --git a/config.c b/config.c
index f99577f9c..ee4f18e98 100755
--- a/config.c
+++ b/config.c
@@ -27,7 +27,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/cli.h"
diff --git a/config_old.c b/config_old.c
index 770d8e50d..d4f366794 100755
--- a/config_old.c
+++ b/config_old.c
@@ -19,7 +19,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/config.h"
#include "asterisk/logger.h"
diff --git a/db.c b/db.c
index 7baabdb39..3a3c96c2e 100755
--- a/db.c
+++ b/db.c
@@ -26,7 +26,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/file.h"
diff --git a/dns.c b/dns.c
index 5f44bbb87..7ea60d5f8 100755
--- a/dns.c
+++ b/dns.c
@@ -18,7 +18,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/channel.h"
diff --git a/dnsmgr.c b/dnsmgr.c
index 2b05ad5f7..984077ff3 100755
--- a/dnsmgr.c
+++ b/dnsmgr.c
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/dnsmgr.h"
#include "asterisk/linkedlists.h"
diff --git a/dsp.c b/dsp.c
index fb945a6bf..ad90ff650 100755
--- a/dsp.c
+++ b/dsp.c
@@ -38,7 +38,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/frame.h"
#include "asterisk/channel.h"
diff --git a/enum.c b/enum.c
index 44a8dfaab..d79d24a14 100755
--- a/enum.c
+++ b/enum.c
@@ -28,7 +28,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/logger.h"
#include "asterisk/options.h"
diff --git a/file.c b/file.c
index 4eaff4626..b4006a881 100755
--- a/file.c
+++ b/file.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/frame.h"
#include "asterisk/file.h"
diff --git a/formats/format_au.c b/formats/format_au.c
index 4ad1958fc..4ce708d01 100755
--- a/formats/format_au.c
+++ b/formats/format_au.c
@@ -21,6 +21,11 @@
#else
#include <machine/endian.h>
#endif
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/file.h"
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 25e1899fe..9a8430184 100755
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -11,12 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
#include <arpa/inet.h>
#include <stdlib.h>
#include <stdio.h>
@@ -24,6 +18,18 @@
#include <errno.h>
#include <string.h>
#include <sys/time.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+
#include "../channels/adtranvofr.h"
diff --git a/formats/format_g726.c b/formats/format_g726.c
index 67ecaae9e..8e3c8b3c3 100755
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -9,14 +9,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/options.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -26,6 +18,19 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/options.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#define RATE_40 0
#define RATE_32 1
#define RATE_24 2
diff --git a/formats/format_g729.c b/formats/format_g729.c
index 597fb78e6..bb25f190f 100755
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -27,6 +20,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
/* Some Ideas for this code came from makeg729e.c by Jeffrey Chilton */
/* Portions of the conversion code are by guido@sienanet.it */
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index 7011e5da6..381733ada 100755
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -26,6 +19,19 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#include "msgsm.h"
/* Some Ideas for this code came from makegsme.c by Jeffrey Chilton */
diff --git a/formats/format_h263.c b/formats/format_h263.c
index c5bfd243e..518ccf6ab 100755
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -27,6 +20,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
/* Some Ideas for this code came from makeh263e.c by Jeffrey Chilton */
/* Portions of the conversion code are by guido@sienanet.it */
diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c
index 19ea3de21..47a437c97 100755
--- a/formats/format_ilbc.c
+++ b/formats/format_ilbc.c
@@ -13,13 +13,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -29,6 +22,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
/* Some Ideas for this code came from makeg729e.c by Jeffrey Chilton */
/* Portions of the conversion code are by guido@sienanet.it */
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c
index 0e81d890f..875e32745 100755
--- a/formats/format_jpeg.c
+++ b/formats/format_jpeg.c
@@ -12,14 +12,6 @@
*/
#include <sys/types.h>
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/image.h"
-#include "asterisk/lock.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -29,6 +21,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/image.h"
+#include "asterisk/lock.h"
+#include "asterisk/endian.h"
static char *desc = "JPEG (Joint Picture Experts Group) Image Format";
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index 6a0552fe5..d3b8a04fb 100755
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -27,6 +20,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#define BUF_SIZE 160 /* 160 samples */
struct ast_filestream {
diff --git a/formats/format_pcm_alaw.c b/formats/format_pcm_alaw.c
index 9b1e5efae..f53deb487 100755
--- a/formats/format_pcm_alaw.c
+++ b/formats/format_pcm_alaw.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -29,6 +22,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#define BUF_SIZE 160 /* 160 samples */
/* #define REALTIME_WRITE */
diff --git a/formats/format_sln.c b/formats/format_sln.c
index 0ae19af67..911163de9 100755
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -9,13 +9,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -25,6 +18,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#define BUF_SIZE 320 /* 320 samples */
struct ast_filestream {
diff --git a/formats/format_vox.c b/formats/format_vox.c
index 8753c3bdd..659281ea1 100755
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -27,6 +20,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#define BUF_SIZE 80 /* 160 samples */
struct ast_filestream {
diff --git a/formats/format_wav.c b/formats/format_wav.c
index 2282aac12..3e8117c3f 100755
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -27,6 +20,18 @@
#include <errno.h>
#include <string.h>
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
/* Some Ideas for this code came from makewave.c by Jeffrey Chilton */
/* Portions of the conversion code are by guido@sienanet.it */
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index 7d8717faa..441cb5d60 100755
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -11,13 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/channel.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/sched.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
@@ -26,6 +19,19 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/channel.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/sched.h"
+#include "asterisk/module.h"
+#include "asterisk/endian.h"
+
#include "msgsm.h"
/* Some Ideas for this code came from makewave.c by Jeffrey Chilton */
diff --git a/frame.c b/frame.c
index 502b3f1f5..457ca1a04 100755
--- a/frame.c
+++ b/frame.c
@@ -19,7 +19,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/frame.h"
diff --git a/fskmodem.c b/fskmodem.c
index 20716717f..98d815fbe 100755
--- a/fskmodem.c
+++ b/fskmodem.c
@@ -18,7 +18,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/fskmodem.h"
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index fb70269a2..b3bd8d3e3 100755
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION("$Revision$") */
+
#ifndef BUILTIN_FUNC
#include "asterisk/module.h"
#endif /* BUILTIN_FUNC */
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 82a8686ba..0e9a13eaa 100755
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -14,6 +14,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_db.c b/funcs/func_db.c
index bc3202da7..d9b60d653 100755
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
@@ -18,6 +18,10 @@
#include <sys/types.h>
#include <regex.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 4d734137f..827dfec97 100755
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index d76c95724..292364a46 100755
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_language.c b/funcs/func_language.c
index 2584e6261..cce6a8370 100755
--- a/funcs/func_language.c
+++ b/funcs/func_language.c
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_logic.c b/funcs/func_logic.c
index 12402637b..e85934d74 100755
--- a/funcs/func_logic.c
+++ b/funcs/func_logic.c
@@ -14,6 +14,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_md5.c b/funcs/func_md5.c
index dedb4ba6d..254c31a68 100755
--- a/funcs/func_md5.c
+++ b/funcs/func_md5.c
@@ -15,6 +15,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 0385fc5dd..de7015190 100755
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -16,6 +16,10 @@
#include <sys/types.h>
#include <regex.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index 950e134c0..76c11e360 100755
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -13,6 +13,10 @@
#include <string.h>
#include <sys/types.h>
+#include "asterisk.h"
+
+/* ASTERISK_FILE_VERSION(__FILE__, "$Revision$") */
+
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/logger.h"
diff --git a/funcs/pbx_functions.c b/funcs/pbx_functions.c
index c998b61ed..4b9799104 100755
--- a/funcs/pbx_functions.c
+++ b/funcs/pbx_functions.c
@@ -16,7 +16,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/pbx.h"
diff --git a/image.c b/image.c
index 067376326..5c6b71eb4 100755
--- a/image.c
+++ b/image.c
@@ -22,7 +22,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/sched.h"
#include "asterisk/options.h"
diff --git a/include/asterisk.h b/include/asterisk.h
index 0e9d2e365..5c82fbd4f 100755
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -58,14 +58,14 @@ void ast_register_file_version(const char *file, const char *version);
void ast_unregister_file_version(const char *file);
#ifdef __GNUC__
-#define ASTERISK_FILE_VERSION(x) \
+#define ASTERISK_FILE_VERSION(file, version) \
static void __attribute__((constructor)) __register_file_version(void) \
{ \
- ast_register_file_version(__FILE__, x); \
+ ast_register_file_version(file, version); \
} \
static void __attribute__((destructor)) __unregister_file_version(void) \
{ \
- ast_unregister_file_version(__FILE__); \
+ ast_unregister_file_version(file); \
}
#else /* ! __GNUC__ */
#define ASTERISK_FILE_VERSION(x) static const char __file_version[] = x;
diff --git a/indications.c b/indications.c
index 59641e0ab..cc1c7e3b0 100755
--- a/indications.c
+++ b/indications.c
@@ -23,7 +23,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/indications.h"
#include "asterisk/frame.h"
diff --git a/io.c b/io.c
index 09d99d5f3..bfb86224f 100755
--- a/io.c
+++ b/io.c
@@ -20,7 +20,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/io.h"
#include "asterisk/logger.h"
diff --git a/jitterbuf.c b/jitterbuf.c
index 3b69e5151..431fff8a1 100755
--- a/jitterbuf.c
+++ b/jitterbuf.c
@@ -19,7 +19,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "jitterbuf.h"
diff --git a/loader.c b/loader.c
index bc7e2bdfc..012491cc1 100755
--- a/loader.c
+++ b/loader.c
@@ -19,7 +19,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/options.h"
diff --git a/logger.c b/logger.c
index 6e938ac04..c498d0db2 100755
--- a/logger.c
+++ b/logger.c
@@ -27,7 +27,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/options.h"
diff --git a/manager.c b/manager.c
index df6b93ff0..c00658695 100755
--- a/manager.c
+++ b/manager.c
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/file.h"
diff --git a/md5.c b/md5.c
index ea162c35a..225b5ff2a 100755
--- a/md5.c
+++ b/md5.c
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/endian.h"
#include "asterisk/md5.h"
diff --git a/pbx.c b/pbx.c
index 717ba9d68..b4df9be52 100755
--- a/pbx.c
+++ b/pbx.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/cli.h"
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c
index 41d97d2ad..b29224d3c 100755
--- a/pbx/dundi-parser.c
+++ b/pbx/dundi-parser.c
@@ -13,12 +13,17 @@
#include <sys/socket.h>
#include <string.h>
#include <netinet/in.h>
-#include "asterisk/frame.h"
-#include "asterisk/utils.h"
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/frame.h"
+#include "asterisk/utils.h"
#include "asterisk/dundi.h"
#include "dundi-parser.h"
#include "asterisk/dundi.h"
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index 1e5bd49bd..69b66d5c2 100755
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -12,6 +12,16 @@
*/
#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/pbx.h"
#include "asterisk/config.h"
#include "asterisk/options.h"
@@ -19,13 +29,6 @@
#include "asterisk/logger.h"
#include "asterisk/cli.h"
#include "asterisk/callerid.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-/* For where to put dynamic tables */
-#include "asterisk.h"
#ifdef __AST_DEBUG_MALLOC
static void FREE(void *ptr)
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index c5deb503c..36149f39c 100755
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -9,6 +9,31 @@
* of the GNU General Public License.
*/
+#include <stdlib.h>
+#include <unistd.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <string.h>
+#include <errno.h>
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__Darwin__)
+#include <sys/types.h>
+#include <netinet/in_systm.h>
+#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>
+#include <ifaddrs.h>
+#endif
+#include <zlib.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -31,26 +56,6 @@
#include "asterisk/aes.h"
#include "dundi-parser.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <arpa/inet.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <string.h>
-#include <errno.h>
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__Darwin__)
-#include <sys/types.h>
-#include <netinet/in_systm.h>
-#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>
-#include <ifaddrs.h>
-#endif
-#include <zlib.h>
#define MAX_RESULTS 64
diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c
index 9394b641c..62443d29e 100755
--- a/pbx/pbx_gtkconsole.c
+++ b/pbx/pbx_gtkconsole.c
@@ -20,13 +20,6 @@
*/
#include <sys/types.h>
-#include "asterisk/pbx.h"
-#include "asterisk/config.h"
-#include "asterisk/module.h"
-#include "asterisk/logger.h"
-#include "asterisk/options.h"
-#include "asterisk/cli.h"
-#include "asterisk/utils.h"
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
@@ -38,9 +31,18 @@
#include <gtk/gtk.h>
#include <glib.h>
-/* For where to put dynamic tables */
+
#include "asterisk.h"
-#include "astconf.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/pbx.h"
+#include "asterisk/config.h"
+#include "asterisk/module.h"
+#include "asterisk/logger.h"
+#include "asterisk/options.h"
+#include "asterisk/cli.h"
+#include "asterisk/utils.h"
AST_MUTEX_DEFINE_STATIC(verb_lock);
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index 065cac855..70159c79b 100755
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -9,6 +9,15 @@
* of the GNU General Public License.
*/
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -29,11 +38,6 @@
#include "asterisk/crypto.h"
#include "asterisk/astdb.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
static char *tdesc = "Loopback Switch";
/* Loopback switch substitutes ${EXTEN}, ${CONTEXT}, and ${PRIORITY} into
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index 8574a6675..c2536b16a 100755
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -9,6 +9,15 @@
* of the GNU General Public License.
*/
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -31,11 +40,6 @@
#include "asterisk/crypto.h"
#include "asterisk/astdb.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-
#define MODE_MATCH 0
#define MODE_MATCHMORE 1
#define MODE_CANMATCH 2
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index c30888dc4..1087cb4b0 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -11,15 +11,6 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
-#include "asterisk/callerid.h"
-#include "asterisk/pbx.h"
-#include "asterisk/module.h"
-#include "asterisk/options.h"
-#include "asterisk/utils.h"
#include <sys/stat.h>
#include <errno.h>
#include <time.h>
@@ -31,8 +22,21 @@
#include <string.h>
#include <stdio.h>
#include <unistd.h>
+
#include "asterisk.h"
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/channel.h"
+#include "asterisk/callerid.h"
+#include "asterisk/pbx.h"
+#include "asterisk/module.h"
+#include "asterisk/options.h"
+#include "asterisk/utils.h"
+
/*
* pbx_spool is similar in spirit to qcall, but with substantially enhanced functionality...
* The spool file contains a header
diff --git a/plc.c b/plc.c
index 261fca8ec..b4f3a6abd 100755
--- a/plc.c
+++ b/plc.c
@@ -37,7 +37,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/plc.h"
diff --git a/privacy.c b/privacy.c
index 2f9feab6e..c02f093e0 100755
--- a/privacy.c
+++ b/privacy.c
@@ -22,7 +22,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/file.h"
diff --git a/res/res_adsi.c b/res/res_adsi.c
index 82c05073a..fb11c368e 100755
--- a/res/res_adsi.c
+++ b/res/res_adsi.c
@@ -21,6 +21,11 @@
#include <unistd.h>
#include <math.h>
#include <errno.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/ulaw.h"
#include "asterisk/alaw.h"
#include "asterisk/callerid.h"
diff --git a/res/res_agi.c b/res/res_agi.c
index 726c54951..275ccf6d5 100755
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -17,13 +17,6 @@
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
-#include "asterisk/pbx.h"
-#include "asterisk/module.h"
-#include "asterisk/astdb.h"
-#include "asterisk/callerid.h"
#include <math.h>
#include <stdlib.h>
#include <unistd.h>
@@ -34,6 +27,18 @@
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/channel.h"
+#include "asterisk/pbx.h"
+#include "asterisk/module.h"
+#include "asterisk/astdb.h"
+#include "asterisk/callerid.h"
#include "asterisk/cli.h"
#include "asterisk/logger.h"
#include "asterisk/options.h"
@@ -46,7 +51,6 @@
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/agi.h"
-#include "asterisk.h"
#ifdef SOLARIS
#include "asterisk/astmm.h"
#endif
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 484741ec7..cba29fac6 100755
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -9,6 +9,14 @@
* Copyright (C) 2004 - 2005 Anthony Minessale II <anthmct@yahoo.com>
*/
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -17,9 +25,6 @@
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/options.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
#include "asterisk/res_odbc.h"
#include "asterisk/utils.h"
diff --git a/res/res_crypto.c b/res/res_crypto.c
index 0ca1b9e11..43936a297 100755
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -12,6 +12,19 @@
*/
#include <sys/types.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/logger.h"
@@ -24,15 +37,6 @@
#include "asterisk/io.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include "asterisk.h"
/*
* Asterisk uses RSA keys with SHA-1 message digests for its
diff --git a/res/res_features.c b/res/res_features.c
index 15546c040..2765cc159 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -11,6 +11,21 @@
* the GNU General Public License
*/
+#include <pthread.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/time.h>
+#include <sys/signal.h>
+#include <netinet/in.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/logger.h"
@@ -28,16 +43,6 @@
#include "asterisk/manager.h"
#include "asterisk/utils.h"
#include "asterisk/adsi.h"
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/time.h>
-#include <sys/signal.h>
-#include <netinet/in.h>
#ifdef __AST_DEBUG_MALLOC
static void FREE(void *ptr)
diff --git a/res/res_indications.c b/res/res_indications.c
index 0b6d74f2a..18f4072d8 100755
--- a/res/res_indications.c
+++ b/res/res_indications.c
@@ -21,6 +21,11 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/cli.h"
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 1053e9aea..80051d582 100755
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -1,3 +1,15 @@
+/* res_monitor.c
+ *
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Copyright (C) 2005, Digium
+ *
+ * Mark Spencer, <markster@digium.com>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -6,6 +18,10 @@
#include <sys/stat.h>
#include <libgen.h> /* dirname() */
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/logger.h"
@@ -18,7 +34,6 @@
#include "asterisk/app.h"
#include "asterisk/utils.h"
#include "asterisk/config.h"
-#include "asterisk.h"
AST_MUTEX_DEFINE_STATIC(monitorlock);
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 33609c442..8aeb8826c 100755
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -11,20 +11,7 @@
* the GNU General Public License
*/
-#include "asterisk/lock.h"
-#include "asterisk/file.h"
-#include "asterisk/logger.h"
-#include "asterisk/channel.h"
-#include "asterisk/pbx.h"
-#include "asterisk/options.h"
-#include "asterisk/module.h"
-#include "asterisk/translate.h"
-#include "asterisk/say.h"
-#include "asterisk/musiconhold.h"
-#include "asterisk/config.h"
-#include "asterisk/utils.h"
#include <stdlib.h>
-#include "asterisk/cli.h"
#include <errno.h>
#include <unistd.h>
#include <string.h>
@@ -45,6 +32,25 @@
#endif
#include <unistd.h>
#include <sys/ioctl.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/lock.h"
+#include "asterisk/file.h"
+#include "asterisk/logger.h"
+#include "asterisk/channel.h"
+#include "asterisk/pbx.h"
+#include "asterisk/options.h"
+#include "asterisk/module.h"
+#include "asterisk/translate.h"
+#include "asterisk/say.h"
+#include "asterisk/musiconhold.h"
+#include "asterisk/config.h"
+#include "asterisk/utils.h"
+#include "asterisk/cli.h"
+
#define MAX_MOHFILES 512
#define MAX_MOHFILE_LEN 128
diff --git a/res/res_odbc.c b/res/res_odbc.c
index c4955980d..14286b6f0 100755
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -9,6 +9,14 @@
* Copyright (C) 2004 - 2005 Anthony Minessale II <anthmct@yahoo.com>
*/
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
@@ -18,9 +26,6 @@
#include "asterisk/module.h"
#include "asterisk/cli.h"
#include "asterisk/lock.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
#include "asterisk/res_odbc.h"
#define MAX_ODBC_HANDLES 25
diff --git a/res/res_osp.c b/res/res_osp.c
index e86a2e881..ed52d8307 100755
--- a/res/res_osp.c
+++ b/res/res_osp.c
@@ -13,6 +13,21 @@
#include <sys/types.h>
#include <osp.h>
+#include <openssl/err.h>
+#include <stdio.h>
+#include <dirent.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <openssl/bio.h>
+#include <openssl/pem.h>
+#include <openssl/evp.h>
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/logger.h"
@@ -30,19 +45,6 @@
#include "asterisk/lock.h"
#include "asterisk/causes.h"
#include "asterisk/callerid.h"
-#include <openssl/err.h>
-#include <stdio.h>
-#include <dirent.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include "asterisk.h"
-#include "astconf.h"
-#include <openssl/bio.h>
-#include <openssl/pem.h>
-#include <openssl/evp.h>
-
#define MAX_CERTS 10
#define MAX_SERVICEPOINTS 10
diff --git a/rtp.c b/rtp.c
index 016cb89f1..a9ecd34a7 100755
--- a/rtp.c
+++ b/rtp.c
@@ -28,7 +28,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/rtp.h"
#include "asterisk/frame.h"
diff --git a/say.c b/say.c
index 908c44018..9e69f79f7 100755
--- a/say.c
+++ b/say.c
@@ -29,7 +29,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/file.h"
#include "asterisk/channel.h"
diff --git a/sched.c b/sched.c
index 98529ea92..9b4dc4d2a 100755
--- a/sched.c
+++ b/sched.c
@@ -25,7 +25,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/sched.h"
#include "asterisk/logger.h"
diff --git a/srv.c b/srv.c
index b74d76158..572f1c263 100755
--- a/srv.c
+++ b/srv.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/logger.h"
diff --git a/tdd.c b/tdd.c
index 9d36e3534..cf94a7b51 100755
--- a/tdd.c
+++ b/tdd.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/ulaw.h"
#include "asterisk/tdd.h"
diff --git a/term.c b/term.c
index f210e2a99..27cdf1e8b 100755
--- a/term.c
+++ b/term.c
@@ -24,7 +24,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/term.h"
#include "asterisk/options.h"
diff --git a/translate.c b/translate.c
index 4c79fbcb5..3ef5c9dc9 100755
--- a/translate.c
+++ b/translate.c
@@ -21,7 +21,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/channel.h"
diff --git a/ulaw.c b/ulaw.c
index 3a867e11e..b97315c2f 100755
--- a/ulaw.c
+++ b/ulaw.c
@@ -13,7 +13,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/ulaw.h"
diff --git a/utils.c b/utils.c
index 6841cb7fe..c7d5e56cd 100755
--- a/utils.c
+++ b/utils.c
@@ -26,7 +26,7 @@
#include "asterisk.h"
-ASTERISK_FILE_VERSION("$Revision$")
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/lock.h"
#include "asterisk/utils.h"