From 7860fcb95c244738ced54a61fdf91b1773900cce Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 2 Oct 2008 23:09:18 +0000 Subject: [PATCH] fixed bug in vicidial.php and manager_send.php that could cause shared sessions git-svn-id: svn://192.168.202.10@956 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/agc/manager_send.php | 6 +++--- agc_2-X/trunk/www/agc/vicidial.php | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/agc_2-X/trunk/www/agc/manager_send.php b/agc_2-X/trunk/www/agc/manager_send.php index 5ec0b6ae..5c002ef4 100644 --- a/agc_2-X/trunk/www/agc/manager_send.php +++ b/agc_2-X/trunk/www/agc/manager_send.php @@ -784,7 +784,7 @@ if ($ACTION=="RedirectXtraNeW") $row=''; $rowx=''; $channel_liveX=1; $channel_liveY=1; - if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($session_id)<3) or ( ( (strlen($extrachannel)<3) or (strlen($exten)<1) ) and ($exten != "NEXTAVAILABLE") ) ) + if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($session_id)<3) or ( ( (strlen($extrachannel)<3) or (strlen($exten)<1) ) and (!ereg("NEXTAVAILABLE",$exten)) ) ) { $channel_liveX=0; $channel_liveY=0; @@ -809,7 +809,7 @@ if ($ACTION=="RedirectXtraNeW") } else { - if ($exten == "NEXTAVAILABLE") + if (ereg("NEXTAVAILABLE",$exten)) { $stmt="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';"; if ($format=='debug') {echo "\n";} @@ -996,7 +996,7 @@ if ($ACTION=="RedirectXtra") } else { - if ($exten == "NEXTAVAILABLE") + if (ereg("NEXTAVAILABLE",$exten)) { $stmt="SELECT conf_exten FROM conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) limit 1;"; if ($format=='debug') {echo "\n";} diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 6aac304d..82aa8d12 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -190,10 +190,11 @@ # 80831-0548 - Added Extended alt-dial-phone display information for non-manual calls # 80909-1717 - Added support for campaign-specific DNC lists # 80915-1754 - Rewrote leave-3way functions for external calling +# 81002-1908 - Fixed double-login bug in some conditions # -$version = '2.0.5-168'; -$build = '80915-1754'; +$version = '2.0.5-169'; +$build = '81002-1908'; require("dbconnect.php"); @@ -1318,7 +1319,7 @@ else if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); - $stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$user';"; + $stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and ( (extension='$SIP_user') or (extension='$user') );"; if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt);