[asterisk-commits] russell: branch group/v6-new r266568 - in /team/group/v6-new: ./ channels/ co...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 31 09:42:00 CDT 2010


Author: russell
Date: Mon May 31 09:41:57 2010
New Revision: 266568

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=266568
Log:
resolve conflict, enable automerge

Modified:
    team/group/v6-new/   (props changed)
    team/group/v6-new/UPGRADE.txt
    team/group/v6-new/channels/chan_sip.c
    team/group/v6-new/configure
    team/group/v6-new/configure.ac
    team/group/v6-new/contrib/init.d/rc.debian.asterisk
    team/group/v6-new/funcs/func_env.c
    team/group/v6-new/main/asterisk.c
    team/group/v6-new/makeopts.in
    team/group/v6-new/res/res_calendar_caldav.c
    team/group/v6-new/res/res_calendar_icalendar.c

Propchange: team/group/v6-new/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/v6-new/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon May 31 09:41:57 2010
@@ -1,1 +1,1 @@
-/trunk:1-266284
+/trunk:1-266567

Modified: team/group/v6-new/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/UPGRADE.txt?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/UPGRADE.txt (original)
+++ team/group/v6-new/UPGRADE.txt Mon May 31 09:41:57 2010
@@ -81,6 +81,9 @@
 * VoiceMailMain and VMAuthenticate, if a '*' is entered in the first position
   of a Mailbox or Password, will, if it exists, jump to the 'a' extension in
   the current dialplan context.
+
+* Environment variables that start with "AST_" are reserved to the system and
+  may no longer be set from the dialplan.
 
 From 1.6.1 to 1.6.2:
 

Modified: team/group/v6-new/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/chan_sip.c?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Mon May 31 09:41:57 2010
@@ -4697,8 +4697,6 @@
  */
 static int create_addr_from_peer(struct sip_pvt *dialog, struct sip_peer *peer)
 {
-	struct sockaddr_in bindaddr_tmp;
-
 	/* this checks that the dialog is contacting the peer on a valid
 	 * transport type based on the peers transport configuration,
 	 * otherwise, this function bails out */
@@ -4718,13 +4716,18 @@
 	dialog->capability = peer->capability;
 	dialog->prefs = peer->prefs;
 	if (ast_test_flag(&dialog->flags[1], SIP_PAGE2_T38SUPPORT)) {
-		if (!dialog->udptl) {
-			/* t38pt_udptl was enabled in the peer and not in [general] */
-			ast_sockaddr_to_sin(&bindaddr, &bindaddr_tmp);
-			dialog->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr_tmp.sin_addr);
-		}
-		dialog->t38_maxdatagram = peer->t38_maxdatagram;
-		set_t38_capabilities(dialog);
+		struct sockaddr_in bindaddr_tmp;
+
+		/* t38pt_udptl was enabled in the peer and not in [general] */
+		ast_sockaddr_to_sin(&bindaddr, &bindaddr_tmp);
+		if (dialog->udptl || (!dialog->udptl && (dialog->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr_tmp.sin_addr)))) {
+			dialog->t38_maxdatagram = peer->t38_maxdatagram;
+			set_t38_capabilities(dialog);
+		} else {
+			/* It is impossible to support T38 without udptl */
+			ast_debug(1, "UDPTL creation failed on dialog.\n");
+			ast_clear_flag(&dialog->flags[1], SIP_PAGE2_T38SUPPORT);
+		}
 	} else if (dialog->udptl) {
 		ast_udptl_destroy(dialog->udptl);
 		dialog->udptl = NULL;
@@ -6060,7 +6063,7 @@
 {
 	int res = 0;
 
-	if (!ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT)) {
+	if (!ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) || !p->udptl) {
 		return -1;
 	}
 	switch (parameters->request_response) {
@@ -6895,6 +6898,10 @@
 			if ((p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr_tmp.sin_addr))) {
 				ast_udptl_setqos(p->udptl, global_tos_audio, global_cos_audio);
 				p->t38_maxdatagram = global_t38_maxdatagram;
+			} else {
+				/* udptl creation failed, T38 can not be supported on this dialog */
+				ast_log(LOG_ERROR, "UDPTL creation failed\n");
+				ast_clear_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT);
 			}
 		}
 		p->maxcallbitrate = default_maxcallbitrate;
@@ -20525,14 +20532,17 @@
 		}
 
 		/* If T38 is needed but not present, then make it magically appear */
-		if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) &&
-		    !p->udptl) {
+		if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) && !p->udptl) {
 			struct sockaddr_in bindaddr_sin_tmp;
 
 			ast_sockaddr_to_sin(&bindaddr, &bindaddr_sin_tmp);
 			if ((p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr_sin_tmp.sin_addr))) {
 				p->t38_maxdatagram = global_t38_maxdatagram;
 				set_t38_capabilities(p);
+			} else {
+				/* udptl creation failed, T38 can not be supported on this dialog */
+				ast_debug(1, "UDPTL creation failed on dialog.\n");
+				ast_clear_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT);
 			}
 		}
 

Modified: team/group/v6-new/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/configure.ac?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/configure.ac (original)
+++ team/group/v6-new/configure.ac Mon May 31 09:41:57 2010
@@ -924,9 +924,6 @@
 
 # Some distributions (like RedHat) add a libical subdirectory for the headers
 AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_get_utc_timezone], [libical/ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
-if test x"${PBX_ICAL}" = x1; then
-	ICAL_INCLUDE+=-I/usr/include/libical
-fi
 
 AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
 

Modified: team/group/v6-new/contrib/init.d/rc.debian.asterisk
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/contrib/init.d/rc.debian.asterisk?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/contrib/init.d/rc.debian.asterisk (original)
+++ team/group/v6-new/contrib/init.d/rc.debian.asterisk Mon May 31 09:41:57 2010
@@ -111,7 +111,7 @@
 	# "start-stop-daemon --oknodo" returns 0 even if Asterisk was already running (as LSB expects):
 	if test "x$COLOR" = "xyes" ; then
 		export TERM=linux
-		start-stop-daemon --start --oknodo --background --exec $DAEMON -- $ASTARGS
+		start-stop-daemon --start --oknodo --background --exec $DAEMON -- $ASTARGS -c
 	else
 		start-stop-daemon --start --oknodo --exec $DAEMON -- $ASTARGS
 	fi

Modified: team/group/v6-new/funcs/func_env.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/funcs/func_env.c?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/funcs/func_env.c (original)
+++ team/group/v6-new/funcs/func_env.c Mon May 31 09:41:57 2010
@@ -44,6 +44,7 @@
 			</parameter>
 		</syntax>
 		<description>
+			<para>Variables starting with <literal>AST_</literal> are reserved to the system and may not be set.</para>
 		</description>
 	</function>
 	<function name="STAT" language="en_US">
@@ -106,7 +107,7 @@
 static int env_write(struct ast_channel *chan, const char *cmd, char *data,
 		     const char *value)
 {
-	if (!ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data) && strncmp(data, "AST_", 4)) {
 		if (!ast_strlen_zero(value)) {
 			setenv(data, value, 1);
 		} else {

Modified: team/group/v6-new/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/asterisk.c?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/main/asterisk.c (original)
+++ team/group/v6-new/main/asterisk.c Mon May 31 09:41:57 2010
@@ -570,7 +570,8 @@
 static char *handle_show_sysinfo(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
 	uint64_t physmem, freeram;
-	uint64_t totalswap = 0, freeswap = 0;
+	uint64_t freeswap = 0;
+	int totalswap = 0;
 	int nprocs = 0;
 	long uptime = 0;
 #if defined(HAVE_SYSINFO)
@@ -655,8 +656,10 @@
 #if defined(HAVE_SYSINFO)
 	ast_cli(a->fd, "  Buffer RAM:                %" PRIu64 " KiB\n", ((uint64_t) sys_info.bufferram * sys_info.mem_unit) / 1024);
 #endif
-	ast_cli(a->fd, "  Total Swap Space:          %" PRIu64 " KiB\n", totalswap);
+#if defined (HAVE_SYSCTL) && defined(HAVE_SWAPCTL)
+	ast_cli(a->fd, "  Total Swap Space:          %u KiB\n", totalswap);
 	ast_cli(a->fd, "  Free Swap Space:           %" PRIu64 " KiB\n\n", freeswap);
+#endif
 	ast_cli(a->fd, "  Number of Processes:       %d \n\n", nprocs);
 	return CLI_SUCCESS;
 }
@@ -3125,6 +3128,18 @@
 	ast_config_destroy(cfg);
 }
 
+static void env_init(void)
+{
+	setenv("AST_SYSTEMNAME", ast_config_AST_SYSTEM_NAME, 1);
+	setenv("AST_BUILD_HOST", ast_build_hostname, 1);
+	setenv("AST_BUILD_DATE", ast_build_date, 1);
+	setenv("AST_BUILD_KERNEL", ast_build_kernel, 1);
+	setenv("AST_BUILD_MACHINE", ast_build_machine, 1);
+	setenv("AST_BUILD_OS", ast_build_os, 1);
+	setenv("AST_BUILD_USER", ast_build_user, 1);
+	setenv("AST_VERSION", ast_get_version(), 1);
+}
+
 int main(int argc, char *argv[])
 {
 	int c;
@@ -3311,6 +3326,7 @@
 	}
 
 	ast_readconfig();
+	env_init();
 
 	if (ast_opt_remote && remotesock != NULL)
 		ast_copy_string((char *) cfg_paths.socket_path, remotesock, sizeof(cfg_paths.socket_path));

Modified: team/group/v6-new/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/makeopts.in?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/makeopts.in (original)
+++ team/group/v6-new/makeopts.in Mon May 31 09:41:57 2010
@@ -150,6 +150,8 @@
 
 NEON_INCLUDE=@NEON_INCLUDE@
 NEON_LIB=@NEON_LIB@
+NEON29_INCLUDE=@NEON_INCLUDE@
+NEON29_LIB=@NEON_LIB@
 
 NETSNMP_INCLUDE=@NETSNMP_INCLUDE@
 NETSNMP_LIB=@NETSNMP_LIB@

Modified: team/group/v6-new/res/res_calendar_caldav.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/res/res_calendar_caldav.c?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/res/res_calendar_caldav.c (original)
+++ team/group/v6-new/res/res_calendar_caldav.c Mon May 31 09:41:57 2010
@@ -29,7 +29,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <ical.h>
+#include <libical/ical.h>
 #include <ne_session.h>
 #include <ne_uri.h>
 #include <ne_request.h>

Modified: team/group/v6-new/res/res_calendar_icalendar.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/res/res_calendar_icalendar.c?view=diff&rev=266568&r1=266567&r2=266568
==============================================================================
--- team/group/v6-new/res/res_calendar_icalendar.c (original)
+++ team/group/v6-new/res/res_calendar_icalendar.c Mon May 31 09:41:57 2010
@@ -28,7 +28,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <ical.h>
+#include <libical/ical.h>
 #include <ne_session.h>
 #include <ne_uri.h>
 #include <ne_request.h>




More information about the asterisk-commits mailing list