summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2014-03-10 16:33:10 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2014-03-10 16:33:10 +0000
commitef69b5176daa82ba7edc09216fe0594e008098e0 (patch)
treeafe888317c7d8dc2efa81ab81a10d8566e737472 /main/manager.c
parentc300f7e5a8634bb0f1824fc146a4c6fffae078ac (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index 18755b507..fe4e7c325 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -4728,8 +4728,8 @@ static int action_originate(struct mansession *s, const struct message *m)
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);
}