[asterisk-commits] sgriepentrog: branch 12 r410368 - in /branches/12: main/ res/ari/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 10 11:32:19 CDT 2014
Author: sgriepentrog
Date: Mon Mar 10 11:32:13 2014
New Revision: 410368
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=410368
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.
Modified:
branches/12/main/manager.c
branches/12/res/ari/resource_channels.c
Modified: branches/12/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/manager.c?view=diff&rev=410368&r1=410367&r2=410368
==============================================================================
--- branches/12/main/manager.c (original)
+++ branches/12/main/manager.c Mon Mar 10 11:32:13 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: branches/12/res/ari/resource_channels.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/ari/resource_channels.c?view=diff&rev=410368&r1=410367&r2=410368
==============================================================================
--- branches/12/res/ari/resource_channels.c (original)
+++ branches/12/res/ari/resource_channels.c Mon Mar 10 11:32:13 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 asterisk-commits
mailing list