[asterisk-commits] russell: branch russell/jack r96718 - in /team/russell/jack: ./ build_tools/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 5 16:13:51 CST 2008


Author: russell
Date: Sat Jan  5 16:13:51 2008
New Revision: 96718

URL: http://svn.digium.com/view/asterisk?view=rev&rev=96718
Log:
sync with trunk

Added:
    team/russell/jack/build_tools/make_version_c   (with props)
    team/russell/jack/include/asterisk/version.h   (with props)
Removed:
    team/russell/jack/build_tools/make_version_h
Modified:
    team/russell/jack/   (props changed)
    team/russell/jack/Makefile
    team/russell/jack/UPGRADE.txt
    team/russell/jack/channels/chan_sip.c
    team/russell/jack/funcs/func_version.c
    team/russell/jack/include/asterisk/   (props changed)
    team/russell/jack/main/   (props changed)
    team/russell/jack/main/Makefile
    team/russell/jack/main/asterisk.c
    team/russell/jack/main/http.c
    team/russell/jack/main/manager.c
    team/russell/jack/main/pbx.c
    team/russell/jack/res/res_agi.c

Propchange: team/russell/jack/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jan  5 16:13:51 2008
@@ -1,1 +1,1 @@
-/trunk:1-96713
+/trunk:1-96717

Modified: team/russell/jack/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/jack/Makefile?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/Makefile (original)
+++ team/russell/jack/Makefile Sat Jan  5 16:13:51 2008
@@ -372,7 +372,7 @@
 	@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LDFLAGS)
 	@$(MAKE) $(PRINT_DIR) $(MOD_SUBDIRS_EMBED_LIBS)
 
-$(SUBDIRS): include/asterisk/version.h include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
+$(SUBDIRS): main/version.c include/asterisk/build.h include/asterisk/buildopts.h defaults.h makeopts.embed_rules
 
 ifeq ($(findstring $(OSARCH), mingw32 cygwin ),)
     # Non-windows:
@@ -403,8 +403,8 @@
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
-include/asterisk/version.h:
-	@build_tools/make_version_h > $@.tmp
+main/version.c:
+	@build_tools/make_version_c > $@.tmp
 	@cmp -s $@.tmp $@ || mv $@.tmp $@
 	@rm -f $@.tmp
 
@@ -427,7 +427,7 @@
 clean: $(SUBDIRS_CLEAN)
 	rm -f defaults.h
 	rm -f include/asterisk/build.h
-	rm -f include/asterisk/version.h
+	rm -f main/version.c
 	@$(MAKE) -C menuselect clean
 	cp -f .cleancount .lastclean
 
@@ -695,7 +695,7 @@
 
 rpm: __rpm
 
-__rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
+__rpm: main/version.c include/asterisk/buildopts.h spec
 	rm -rf /tmp/asterisk ; \
 	mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
 	$(MAKE) DESTDIR=/tmp/asterisk install ; \
@@ -820,4 +820,4 @@
 asterisk.pdf:
 	$(MAKE) -C doc/tex asterisk.pdf
 
-.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) include/asterisk/version.h
+.PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all pdf dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_DIST_CLEAN) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) main/version.c

Modified: team/russell/jack/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/russell/jack/UPGRADE.txt?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/UPGRADE.txt (original)
+++ team/russell/jack/UPGRADE.txt Sat Jan  5 16:13:51 2008
@@ -136,6 +136,13 @@
   to be compatible with settings in sip.conf. The "tos" and "cos" configuration
   is deprecated and will stop working in the next release of Asterisk.
 
+* Console: A new console channel driver, chan_console, has been added to Asterisk.
+  This new module can not be loaded at the same time as chan_alsa or chan_oss.  The
+  default modules.conf only loads one of them (chan_oss by default).  So, unless you
+  have modified your modules.conf to not use the autoload option, then you will need
+  to modify modules.conf to add another "noload" line to ensure that only one of
+  these three modules gets loaded.
+
 Configuration:
 
 * pbx_dundi.c: tos parameter changed to use new values. Old values like lowdelay,

Added: team/russell/jack/build_tools/make_version_c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/build_tools/make_version_c?view=auto&rev=96718
==============================================================================
--- team/russell/jack/build_tools/make_version_c (added)
+++ team/russell/jack/build_tools/make_version_c Sat Jan  5 16:13:51 2008
@@ -1,0 +1,24 @@
+#!/bin/sh
+if [ ! -f ../.flavor ]; then
+    EXTRA=""
+else
+    aadkver=`cat ../.version`
+    aadkflavor=`cat ../.flavor`
+    EXTRA=" (${aadkflavor} ${aadkver})"
+fi
+cat << END
+/*
+ * version.c 
+ * Automatically generated
+ */
+
+static const char asterisk_version[] = "${ASTERISKVERSION}${EXTRA}";
+
+#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}
+
+const char *ast_get_version(void)
+{
+	return asterisk_version;
+}
+
+END

Propchange: team/russell/jack/build_tools/make_version_c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/russell/jack/build_tools/make_version_c
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/russell/jack/build_tools/make_version_c
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/russell/jack/build_tools/make_version_c
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/russell/jack/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/channels/chan_sip.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/channels/chan_sip.c (original)
+++ team/russell/jack/channels/chan_sip.c Sat Jan  5 16:13:51 2008
@@ -18371,8 +18371,8 @@
 	global_directrtpsetup = FALSE;		/* Experimental feature, disabled by default */
 	global_alwaysauthreject = 0;
 	global_allowsubscribe = FALSE;
-	snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ASTERISK_VERSION);
-	snprintf(global_sdpsession, sizeof(global_sdpsession), "%s %s", DEFAULT_SDPSESSION, ASTERISK_VERSION);
+	snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ast_get_version());
+	snprintf(global_sdpsession, sizeof(global_sdpsession), "%s %s", DEFAULT_SDPSESSION, ast_get_version());
 	snprintf(global_sdpowner, sizeof(global_sdpowner), "%s", DEFAULT_SDPOWNER);
 	ast_copy_string(default_notifymime, DEFAULT_NOTIFYMIME, sizeof(default_notifymime));
 	ast_copy_string(global_realm, S_OR(ast_config_AST_SYSTEM_NAME, DEFAULT_REALM), sizeof(global_realm));

Modified: team/russell/jack/funcs/func_version.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/funcs/func_version.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/funcs/func_version.c (original)
+++ team/russell/jack/funcs/func_version.c Sat Jan  5 16:13:51 2008
@@ -34,39 +34,35 @@
 #include "asterisk/version.h"
 #include "asterisk/build.h"
 
-#define STRING_IT(vernum) STRING_IT2(vernum)
-#define STRING_IT2(vernum) #vernum
-
 static int acf_version_exec(struct ast_channel *chan, const char *cmd,
 			 char *parse, char *buffer, size_t buflen)
 {
-	char *response_char = ASTERISK_VERSION;
+	const char *response_char = ast_get_version();
 	AST_DECLARE_APP_ARGS(args,
-			     AST_APP_ARG(info);
+		AST_APP_ARG(info);
 	);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	if (!ast_strlen_zero(args.info) ) {
-		if (strcasecmp(args.info,"ASTERISK_VERSION_NUM") == 0)
-			response_char = STRING_IT(ASTERISK_VERSION_NUM);
-		else if (strcasecmp(args.info,"BUILD_USER") == 0)
+		if (!strcasecmp(args.info,"ASTERISK_VERSION_NUM"))
+			response_char = ast_get_version_num();
+		else if (!strcasecmp(args.info,"BUILD_USER"))
 			response_char = BUILD_USER;
-		else if (strcasecmp(args.info,"BUILD_HOSTNAME") == 0)
+		else if (!strcasecmp(args.info,"BUILD_HOSTNAME"))
 			response_char = BUILD_HOSTNAME;
-		else if (strcasecmp(args.info,"BUILD_MACHINE") == 0)
+		else if (!strcasecmp(args.info,"BUILD_MACHINE"))
 			response_char = BUILD_MACHINE;
-		else if (strcasecmp(args.info,"BUILD_KERNEL") == 0)
+		else if (!strcasecmp(args.info,"BUILD_KERNEL"))
 			response_char = BUILD_KERNEL;
-		else if (strcasecmp(args.info,"BUILD_OS") == 0)
+		else if (!strcasecmp(args.info,"BUILD_OS"))
 			response_char = BUILD_OS;
-		else if (strcasecmp(args.info,"BUILD_DATE") == 0)
+		else if (!strcasecmp(args.info,"BUILD_DATE"))
 			response_char = BUILD_DATE;
-
 	}
 
+	ast_debug(1, "VERSION returns %s result, given %s argument\n", response_char, args.info);
 
-	ast_debug(1, "VERSION returns %s result, given %s argument\n", response_char, args.info);
 	snprintf(buffer, buflen, "%s", response_char);
 
 	return 0;

Propchange: team/russell/jack/include/asterisk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jan  5 16:13:51 2008
@@ -1,4 +1,3 @@
 build.h
-version.h
 buildopts.h
 autoconfig.h

Added: team/russell/jack/include/asterisk/version.h
URL: http://svn.digium.com/view/asterisk/team/russell/jack/include/asterisk/version.h?view=auto&rev=96718
==============================================================================
--- team/russell/jack/include/asterisk/version.h (added)
+++ team/russell/jack/include/asterisk/version.h Sat Jan  5 16:13:51 2008
@@ -1,0 +1,7 @@
+/*
+ * version.h 
+ * Automatically generated
+ */
+#define ASTERISK_VERSION "SVN-russell-jack-r96690M-/trunk"
+#define ASTERISK_VERSION_NUM 999999
+

Propchange: team/russell/jack/include/asterisk/version.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/russell/jack/include/asterisk/version.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/russell/jack/include/asterisk/version.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: team/russell/jack/main/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jan  5 16:13:51 2008
@@ -2,3 +2,4 @@
 *.s
 asterisk
 *.d
+version.c

Modified: team/russell/jack/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/russell/jack/main/Makefile?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/main/Makefile (original)
+++ team/russell/jack/main/Makefile Sat Jan  5 16:13:51 2008
@@ -29,7 +29,7 @@
 	netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
 	cryptostub.o sha1.o http.o fixedjitterbuf.o abstract_jb.o \
 	strcompat.o threadstorage.o dial.o event.o adsistub.o audiohook.o \
-	astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS)
+	astobj2.o hashtab.o global_datastores.o $(RESAMPLE_OBJS) version.o
 
 # we need to link in the objects statically, not as a library, because
 # otherwise modules will not have them available if none of the static

Modified: team/russell/jack/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/main/asterisk.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/main/asterisk.c (original)
+++ team/russell/jack/main/asterisk.c Sat Jan  5 16:13:51 2008
@@ -135,7 +135,7 @@
 
 /*! \brief Welcome message when starting a CLI interface */
 #define WELCOME_MESSAGE \
-    ast_verbose("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2007 Digium, Inc. and others.\n" \
+    ast_verbose("Asterisk %s, Copyright (C) 1999 - 2007 Digium, Inc. and others.\n" \
                 "Created by Mark Spencer <markster at digium.com>\n" \
                 "Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.\n" \
                 "This is free software, with components licensed under the GNU General Public\n" \
@@ -143,7 +143,7 @@
                 "certain conditions. Type 'core show license' for details.\n" \
                 "=========================================================================\n" \
                 "NOTE: This is a development version of Asterisk, and should not be used in\n" \
-                "production installations.\n");
+                "production installations.\n", ast_get_version());
 
 /*! \defgroup main_options Main Configuration Options
  * \brief Main configuration options from asterisk.conf or OS command line on starting Asterisk.
@@ -394,7 +394,7 @@
 
 	ast_cli(a->fd, "\nPBX Core settings\n");
 	ast_cli(a->fd, "-----------------\n");
-	ast_cli(a->fd, "  Version:                     %s\n", "" ASTERISK_VERSION "" );
+	ast_cli(a->fd, "  Version:                     %s\n", ast_get_version());
 	if (option_maxcalls)
 		ast_cli(a->fd, "  Max. calls:                  %d (Current %d)\n", option_maxcalls, ast_active_channels());
 	else
@@ -980,7 +980,7 @@
 	
 	if (gethostname(hostname, sizeof(hostname)-1))
 		ast_copy_string(hostname, "<Unknown>", sizeof(hostname));
-	snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ASTERISK_VERSION);
+	snprintf(tmp, sizeof(tmp), "%s/%ld/%s\n", hostname, (long)ast_mainpid, ast_get_version());
 	fdprint(con->fd, tmp);
 	for (;;) {
 		fds[0].fd = con->fd;
@@ -1515,7 +1515,7 @@
 	if (a->argc != 3)
 		return CLI_SHOWUSAGE;
 	ast_cli(a->fd, "Asterisk %s built by %s @ %s on a %s running %s on %s\n",
-		ASTERISK_VERSION, ast_build_user, ast_build_hostname,
+		ast_get_version(), ast_build_user, ast_build_hostname,
 		ast_build_machine, ast_build_os, ast_build_date);
 	return CLI_SUCCESS;
 }
@@ -2387,12 +2387,12 @@
 
 static int show_version(void)
 {
-	printf("Asterisk " ASTERISK_VERSION "\n");
+	printf("Asterisk %s\n", ast_get_version());
 	return 0;
 }
 
 static int show_cli_help(void) {
-	printf("Asterisk " ASTERISK_VERSION ", Copyright (C) 1999 - 2007, Digium, Inc. and others.\n");
+	printf("Asterisk %s, Copyright (C) 1999 - 2007, Digium, Inc. and others.\n", ast_get_version());
 	printf("Usage: asterisk [OPTIONS]\n");
 	printf("Valid Options:\n");
 	printf("   -V              Display version number and exit\n");

Modified: team/russell/jack/main/http.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/main/http.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/main/http.c (original)
+++ team/russell/jack/main/http.c Sat Jan  5 16:13:51 2008
@@ -186,7 +186,7 @@
 		"Cache-Control: no-cache, no-store\r\n"
 		"Content-Length: %d\r\n"
 		"Content-type: %s\r\n\r\n",
-		ASTERISK_VERSION, buf, (int) st.st_size, mtype);
+		ast_get_version(), buf, (int) st.st_size, mtype);
 
 	while ((len = read(fd, buf, sizeof(buf))) > 0)
 		fwrite(buf, 1, len, ser->f);
@@ -847,7 +847,7 @@
 				"Date: %s\r\n"
 				"Connection: close\r\n"
 				"%s",
-			status, title ? title : "OK", ASTERISK_VERSION, timebuf,
+			status, title ? title : "OK", ast_get_version(), timebuf,
 			static_content ? "" : "Cache-Control: no-cache, no-store\r\n");
 		if (!contentlength) {	/* opaque body ? just dump it hoping it is properly formatted */
 			fprintf(ser->f, "%s", out->str);

Modified: team/russell/jack/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/main/manager.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/main/manager.c (original)
+++ team/russell/jack/main/manager.c Sat Jan  5 16:13:51 2008
@@ -2222,7 +2222,7 @@
 			,
 		        idText,
 			AMI_VERSION,
-			ASTERISK_VERSION, 
+			ast_get_version(), 
 			ast_config_AST_SYSTEM_NAME,
 			option_maxcalls,
 			option_maxload,

Modified: team/russell/jack/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/main/pbx.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/main/pbx.c (original)
+++ team/russell/jack/main/pbx.c Sat Jan  5 16:13:51 2008
@@ -2268,6 +2268,7 @@
 int __ast_custom_function_register(struct ast_custom_function *acf, struct ast_module *mod)
 {
 	struct ast_custom_function *cur;
+	char tmps[80];
 
 	if (!acf)
 		return -1;
@@ -2297,7 +2298,7 @@
 
 	AST_RWLIST_UNLOCK(&acf_root);
 
-	ast_verb(2, "Registered custom function %s\n", acf->name);
+	ast_verb(2, "Registered custom function '%s'\n", term_color(tmps, acf->name, COLOR_BRCYAN, 0, sizeof(tmps)));
 
 	return 0;
 }

Modified: team/russell/jack/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/team/russell/jack/res/res_agi.c?view=diff&rev=96718&r1=96717&r2=96718
==============================================================================
--- team/russell/jack/res/res_agi.c (original)
+++ team/russell/jack/res/res_agi.c Sat Jan  5 16:13:51 2008
@@ -744,7 +744,7 @@
 	ast_agi_fdprintf(chan, fd, "agi_language: %s\n", chan->language);
 	ast_agi_fdprintf(chan, fd, "agi_type: %s\n", chan->tech->type);
 	ast_agi_fdprintf(chan, fd, "agi_uniqueid: %s\n", chan->uniqueid);
-	ast_agi_fdprintf(chan, fd, "agi_version: %s\n", ASTERISK_VERSION);
+	ast_agi_fdprintf(chan, fd, "agi_version: %s\n", ast_get_version());
 
 	/* ANI/DNIS */
 	ast_agi_fdprintf(chan, fd, "agi_callerid: %s\n", S_OR(chan->cid.cid_num, "unknown"));




More information about the asterisk-commits mailing list