Fixes to the VirtualFIreAlarmAgent

Shabirmean 9 years ago
parent eb3a5c7254
commit 08c37717d7

@ -88,8 +88,7 @@ public class FireAlarmXMPPCommunicator extends XMPPTransportHandler {
} catch (TransportHandlerException e) {
if (log.isDebugEnabled()) {
log.warn(AgentConstants.LOG_APPENDER +
"Connection/Login to XMPP server at: " + server +
" failed");
"Connection/Login to XMPP server at: " + server + " failed");
}
}
}
@ -219,22 +218,24 @@ public class FireAlarmXMPPCommunicator extends XMPPTransportHandler {
public void disconnect() {
Runnable stopConnection = new Runnable() {
public void run() {
while (isConnected()) {
if ( dataPushServiceHandler != null) {
dataPushServiceHandler.cancel(true);
}
while (isConnected()) {
connectorServiceHandler.cancel(true);
closeConnection();
if (log.isDebugEnabled()) {
log.warn(AgentConstants.LOG_APPENDER +
"Unable to 'STOP' connection to XMPP server at: " +
server);
"Unable to 'STOP' connection to XMPP server at: " + server);
}
try {
Thread.sleep(timeoutInterval);
} catch (InterruptedException e1) {
log.error(AgentConstants.LOG_APPENDER +
"XMPP-Terminator: Thread Sleep Interrupt Exception");
log.error(AgentConstants.LOG_APPENDER + "XMPP-Terminator: Thread Sleep Interrupt Exception");
}
}

@ -30,14 +30,14 @@
#define WLAN_SSID "SSID" // cannot be longer than 32 characters!
#define WLAN_PASS "password"
#define WLAN_SECURITY WLAN_SEC_WPA
#define WLAN_SECURITY WLAN_SEC_WPA2
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define IDLE_TIMEOUT_MS 3000
#define DEVICE_OWNER "${DEVICE_OWNER}"
#define DEVICE_ID "${DEVICE_ID}"
#define DEVICE_TOKEN "${DEVICE_TOKEN}"
#define REFRESH_DEVICE_TOKEN "${REFRESH_DEVICE_TOKEN}"
#define REFRESH_DEVICE_TOKEN "${DEVICE_REFRESH_TOKEN}"
#define SERVICE_PORT 9763

Loading…
Cancel
Save