[svn-commits] sgriepentrog: trunk r410369 - in /trunk: ./ main/ res/ari/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Mar 10 11:33:14 CDT 2014


Author: sgriepentrog
Date: Mon Mar 10 11:33:10 2014
New Revision: 410369

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410369
Log:
unqiueid: correct max uniqueid length test

This patch adds null string test prior to checking for
a max uniqueid value that was added in r410157.
........

Merged revisions 410368 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/main/manager.c
    trunk/res/ari/resource_channels.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=410369&r1=410368&r2=410369
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Mar 10 11:33:10 2014
@@ -4728,8 +4728,8 @@
 	pthread_t th;
 	int bridge_early = 0;
 
-	if (strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID ||
-		strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID) {
+	if ((!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID) ||
+		(!ast_strlen_zero(assignedids.uniqueid2) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
 		ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
 	}
 

Modified: trunk/res/ari/resource_channels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ari/resource_channels.c?view=diff&rev=410369&r1=410368&r2=410369
==============================================================================
--- trunk/res/ari/resource_channels.c (original)
+++ trunk/res/ari/resource_channels.c Mon Mar 10 11:33:10 2014
@@ -779,7 +779,7 @@
 	struct ast_assigned_ids assignedids = {args_channel_id, args_other_channel_id};
 
 	if ((!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid) >= AST_MAX_UNIQUEID) || 
-		(!ast_strlen_zero(assignedids.uniqueid) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
+		(!ast_strlen_zero(assignedids.uniqueid2) && strlen(assignedids.uniqueid2) >= AST_MAX_UNIQUEID)) {
 		ast_log(LOG_WARNING, "Uniqueid length exceeds maximum of %d\n", AST_MAX_UNIQUEID);
 	}
 




More information about the svn-commits mailing list