mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-02 11:47:47 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -105,7 +105,12 @@ namespace OpenWifi {
|
||||
if(valid_) {
|
||||
valid_ = false;
|
||||
DeRegister();
|
||||
RTTYS_server()->NotifyDeviceDisconnect(id_, this);
|
||||
if(deviceIsRegistered_) {
|
||||
deviceIsRegistered_ = false;
|
||||
RTTYS_server()->NotifyDeviceDisconnect(id_, this);
|
||||
} else {
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
19
test_scripts/python/rtty_2_7_test.py
Executable file
19
test_scripts/python/rtty_2_7_test.py
Executable file
@@ -0,0 +1,19 @@
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
GW_HOSTNAME = 'ucentral.dpaas.arilia.com'
|
||||
|
||||
# Open TCP Connection
|
||||
soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
soc.connect((GW_HOSTNAME, 5912))
|
||||
|
||||
# SSL
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
|
||||
context.check_hostname = False
|
||||
context.verify_mode = ssl.VerifyMode.CERT_NONE
|
||||
rtty_socket = context.wrap_socket(soc, server_hostname=GW_HOSTNAME)
|
||||
|
||||
# Message type register to trigger call to 'RTTYS_Device_ConnectionHandler::do_msgTypeRegister'
|
||||
buffer = b'\x00\x01\x04\x06\x00\x00\x00'
|
||||
rtty_socket.send(buffer)
|
||||
rtty_socket.send(buffer)
|
||||
Reference in New Issue
Block a user