[asterisk-commits] bebuild: tag 11.6.0-rc2 r401235 - in /tags/11.6.0-rc2: ./ channels/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 18 11:38:48 CDT 2013


Author: bebuild
Date: Fri Oct 18 11:38:45 2013
New Revision: 401235

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401235
Log:
Merge changes for 11.6.0-rc2

* Remove old summaries; update version; update ChangeLog
* Merged r399513 for ASTERISK-22560
* Merged r401167 for ASTERISK-22236
* Merged r401179 for ASTERISK-22718
* Merged r401182 for ASTERISK-22729


Removed:
    tags/11.6.0-rc2/asterisk-11.6.0-rc1-summary.html
    tags/11.6.0-rc2/asterisk-11.6.0-rc1-summary.txt
Modified:
    tags/11.6.0-rc2/   (props changed)
    tags/11.6.0-rc2/.version
    tags/11.6.0-rc2/ChangeLog
    tags/11.6.0-rc2/channels/chan_sip.c
    tags/11.6.0-rc2/main/channel.c
    tags/11.6.0-rc2/main/logger.c

Propchange: tags/11.6.0-rc2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Oct 18 11:38:45 2013
@@ -1,1 +1,2 @@
+/branches/11:399513,401167,401179,401182
 /certified/branches/1.8.15:382389

Modified: tags/11.6.0-rc2/.version
URL: http://svnview.digium.com/svn/asterisk/tags/11.6.0-rc2/.version?view=diff&rev=401235&r1=401234&r2=401235
==============================================================================
--- tags/11.6.0-rc2/.version (original)
+++ tags/11.6.0-rc2/.version Fri Oct 18 11:38:45 2013
@@ -1,1 +1,1 @@
-11.6.0-rc1
+11.6.0-rc2

Modified: tags/11.6.0-rc2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/11.6.0-rc2/ChangeLog?view=diff&rev=401235&r1=401234&r2=401235
==============================================================================
--- tags/11.6.0-rc2/ChangeLog (original)
+++ tags/11.6.0-rc2/ChangeLog Fri Oct 18 11:38:45 2013
@@ -1,3 +1,44 @@
+2013-10-18  Asterisk Development Team <asteriskteam at digium.com>
+
+	* Asterisk 11.6.0-rc2 Released.
+
+	* Properly copy/remove the device state cache flag over a masquerade.
+
+	  In r378303 the AST_FLAG_DISABLE_DEVSTATE_CACHE flag was added that
+	  tells	the devstate system to not cache states for non-real devices.
+	  However, when optimizing away channels (ast_do_masquerade), that\
+	  flag wasn't copied.
+
+	  In my case, using Local devices as queue members created a situation
+	  where the endpoint was considered in use, but the state change of the
+	  device being available again was ignored (not cached). The endpoint
+	  channel was optimized into the (previously) Local channel, but kept
+	  the do-not-cache flag. The end result being that the queue member
+	  apparently stayed in use forever.
+
+	* Fix Setting A chan_sip Dialog's SIP_NAT_FORCE_RPORT Flag
+
+	  A condition was added in a commit to fix ASTERISK-21374, that, if the
+	  SIP_PAGE3_NAT_AUTO_RPORT flag was set, to then copy a peer's
+	  SIP_NAT_FORCE_RPORT flag to the dialog.  This condition should not
+	  have been there since	it assumed that if Asterisk is in an
+	  environment where NAT is involved, that the auto_* nat settings or
+	  force_rport setting would be on in the global settings. If the nat
+	  setting in the global setting is set to 'nat=no' and then turned on
+	  for peers (which is not quite the recommended way, although it is
+	  allowed) this flag is never copied to the dialog resulting in
+	  problems like, REGISTER replies going to the wrong port.
+
+	  This patch removes this conditional check and will now always use the
+	  peer's flag which by this point in the code the checks on whether the
+	  peer is behind NAT or not (if using auto_force_rport) have already
+	  been run.
+
+	* Fix memory leak in logger
+
+	  Fixed a memory leak discovered in the logger where a temporary string
+	  buffer was not being freed.
+
 2013-09-19  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Asterisk 11.6.0-rc1 Released.

Modified: tags/11.6.0-rc2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.6.0-rc2/channels/chan_sip.c?view=diff&rev=401235&r1=401234&r2=401235
==============================================================================
--- tags/11.6.0-rc2/channels/chan_sip.c (original)
+++ tags/11.6.0-rc2/channels/chan_sip.c Fri Oct 18 11:38:45 2013
@@ -16884,9 +16884,8 @@
 		} else {
 
 			set_peer_nat(p, peer);
-			if (p->natdetected && ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
-				ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_NAT_FORCE_RPORT);
-			}
+
+			ast_copy_flags(&p->flags[0], &peer->flags[0], SIP_NAT_FORCE_RPORT);
 
 			if (!(res = check_auth(p, req, peer->name, peer->secret, peer->md5secret, SIP_REGISTER, uri2, XMIT_UNRELIABLE))) {
 				if (sip_cancel_destroy(p))
@@ -17938,9 +17937,9 @@
 		return;
 	}
 
-	if (ast_sockaddr_cmp(addr, &p->recv)) {
-		char *tmp_str = ast_strdupa(ast_sockaddr_stringify(addr));
-		ast_debug(3, "NAT detected for %s / %s\n", tmp_str, ast_sockaddr_stringify(&p->recv));
+	if (ast_sockaddr_cmp_addr(addr, &p->recv)) {
+		char *tmp_str = ast_strdupa(ast_sockaddr_stringify_addr(addr));
+		ast_debug(3, "NAT detected for %s / %s\n", tmp_str, ast_sockaddr_stringify_addr(&p->recv));
 		p->natdetected = 1;
 		if (ast_test_flag(&p->flags[2], SIP_PAGE3_NAT_AUTO_RPORT)) {
 			ast_set_flag(&p->flags[0], SIP_NAT_FORCE_RPORT);

Modified: tags/11.6.0-rc2/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.6.0-rc2/main/channel.c?view=diff&rev=401235&r1=401234&r2=401235
==============================================================================
--- tags/11.6.0-rc2/main/channel.c (original)
+++ tags/11.6.0-rc2/main/channel.c Fri Oct 18 11:38:45 2013
@@ -6793,6 +6793,8 @@
 {
 	int x;
 	int origstate;
+	unsigned int orig_disablestatecache;
+	unsigned int clone_disablestatecache;
 	int visible_indication;
 	int clone_was_zombie = 0;/*!< TRUE if the clonechan was a zombie before the masquerade. */
 	struct ast_frame *current;
@@ -7028,6 +7030,20 @@
 	origstate = ast_channel_state(original);
 	ast_channel_state_set(original, ast_channel_state(clonechan));
 	ast_channel_state_set(clonechan, origstate);
+
+	/* And the swap the cachable state too. Otherwise we'd start caching
+	 * Local channels and ignoring real ones. */
+	orig_disablestatecache = ast_test_flag(ast_channel_flags(original), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+	clone_disablestatecache = ast_test_flag(ast_channel_flags(clonechan), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+	if (orig_disablestatecache != clone_disablestatecache) {
+		if (orig_disablestatecache) {
+			ast_clear_flag(ast_channel_flags(original), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+			ast_set_flag(ast_channel_flags(clonechan), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+		} else {
+			ast_set_flag(ast_channel_flags(original), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+			ast_clear_flag(ast_channel_flags(clonechan), AST_FLAG_DISABLE_DEVSTATE_CACHE);
+		}
+	}
 
 	/* Mangle the name of the clone channel */
 	snprintf(zombn, sizeof(zombn), "%s<ZOMBIE>", orig); /* quick, hide the brains! */

Modified: tags/11.6.0-rc2/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.6.0-rc2/main/logger.c?view=diff&rev=401235&r1=401234&r2=401235
==============================================================================
--- tags/11.6.0-rc2/main/logger.c (original)
+++ tags/11.6.0-rc2/main/logger.c Fri Oct 18 11:38:45 2013
@@ -1811,6 +1811,7 @@
 	res = ast_str_set_va(&buf, 0, fmt, ap);
 	/* If the build failed then we can drop this allocated message */
 	if (res == AST_DYNSTR_BUILD_FAILED) {
+		ast_free(buf);
 		return;
 	}
 
@@ -1838,6 +1839,7 @@
 	} while (p && *p);
 
 	ast_log_callid(__LOG_VERBOSE, file, line, func, callid, "%s", ast_str_buffer(prefixed));
+	ast_free(buf);
 }
 
 void __ast_verbose(const char *file, int line, const char *func, int level, const char *fmt, ...)




More information about the asterisk-commits mailing list