Event Guard: Remove parameters from event_socket connect() method.
This commit is contained in:
parent
d9d17a6917
commit
d4f7efa4eb
|
|
@ -106,17 +106,9 @@
|
||||||
//$ip_address = '10.7.0.253';
|
//$ip_address = '10.7.0.253';
|
||||||
//$result = access_allowed($ip_address);
|
//$result = access_allowed($ip_address);
|
||||||
|
|
||||||
//initialize the settings object
|
|
||||||
$setting = new settings(["category" => 'switch']);
|
|
||||||
|
|
||||||
//set the event socket variables
|
|
||||||
$event_socket_ip_address = $setting->get('switch','event_socket_ip_address');
|
|
||||||
$event_socket_port = $setting->get('switch', 'event_socket_port');
|
|
||||||
$event_socket_password = $setting->get('switch', 'event_socket_password');
|
|
||||||
|
|
||||||
//connect to event socket
|
//connect to event socket
|
||||||
$socket = new event_socket;
|
$socket = new event_socket;
|
||||||
if (!$socket->connect($event_socket_ip_address, $event_socket_port, $event_socket_password)) {
|
if (!$socket->connect()) {
|
||||||
echo "Unable to connect to event socket\n";
|
echo "Unable to connect to event socket\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,7 +144,7 @@
|
||||||
//reconnect to event socket
|
//reconnect to event socket
|
||||||
if (!$socket->connected()) {
|
if (!$socket->connected()) {
|
||||||
//echo "Not connected to even socket\n";
|
//echo "Not connected to even socket\n";
|
||||||
if ($socket->connect($event_socket_ip_address, $event_socket_port, $event_socket_password)) {
|
if ($socket->connect()) {
|
||||||
$cmd = "event json ALL";
|
$cmd = "event json ALL";
|
||||||
$result = $socket->request($cmd);
|
$result = $socket->request($cmd);
|
||||||
if ($debug) { print_r($result); }
|
if ($debug) { print_r($result); }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue