检查设备是否存在, 不存在则不回复心跳
This commit is contained in:
parent
27c0332052
commit
098307cfe8
@ -315,12 +315,16 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
|||||||
try {
|
try {
|
||||||
Element rootElement = getRootElement(evt);
|
Element rootElement = getRootElement(evt);
|
||||||
String deviceId = XmlUtil.getText(rootElement, "DeviceID");
|
String deviceId = XmlUtil.getText(rootElement, "DeviceID");
|
||||||
// 回复200 OK
|
// 检查设备是否存在, 不存在则不回复
|
||||||
responseAck(evt);
|
if (storager.exists(deviceId)) {
|
||||||
if (offLineDetector.isOnline(deviceId)) {
|
// 回复200 OK
|
||||||
publisher.onlineEventPublish(deviceId, VideoManagerConstants.EVENT_ONLINE_KEEPLIVE);
|
responseAck(evt);
|
||||||
} else {
|
if (offLineDetector.isOnline(deviceId)) {
|
||||||
|
publisher.onlineEventPublish(deviceId, VideoManagerConstants.EVENT_ONLINE_KEEPLIVE);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
|
} catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user