CC-3519: System-> Stream> Problem with Master DJ Port and DJ Port settings
- fixed
This commit is contained in:
parent
9dbe8a5e5e
commit
b935c82b83
|
@ -132,24 +132,28 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$element->addError("You cannot use same port as Master DJ port.");
|
||||
}
|
||||
if($master_harbor_input_port != ""){
|
||||
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$res = socket_bind($sock, 0, $master_harbor_input_port);
|
||||
if(!$res){
|
||||
$element = $this->getElement("master_harbor_input_port");
|
||||
$element->addError("Port '$master_harbor_input_port' is not available.");
|
||||
$isValid = false;
|
||||
if($master_harbor_input_port != Application_Model_StreamSetting::GetMasterLiveSteamPort()){
|
||||
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$res = socket_bind($sock, 0, $master_harbor_input_port);
|
||||
if(!$res){
|
||||
$element = $this->getElement("master_harbor_input_port");
|
||||
$element->addError("Port '$master_harbor_input_port' is not available.");
|
||||
$isValid = false;
|
||||
}
|
||||
socket_close($sock);
|
||||
}
|
||||
socket_close($sock);
|
||||
}
|
||||
if($dj_harbor_input_port != ""){
|
||||
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$res = socket_bind($sock, 0, $dj_harbor_input_port);
|
||||
if(!$res){
|
||||
$element = $this->getElement("dj_harbor_input_port");
|
||||
$element->addError("Port '$dj_harbor_input_port' is not available.");
|
||||
$isValid = false;
|
||||
if($dj_harbor_input_port != Application_Model_StreamSetting::GetDJLiveSteamPort()){
|
||||
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$res = socket_bind($sock, 0, $dj_harbor_input_port);
|
||||
if(!$res){
|
||||
$element = $this->getElement("dj_harbor_input_port");
|
||||
$element->addError("Port '$dj_harbor_input_port' is not available.");
|
||||
$isValid = false;
|
||||
}
|
||||
socket_close($sock);
|
||||
}
|
||||
socket_close($sock);
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue