mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-06-21 18:47:49 +08:00
兼容部分宇视设备ElementName和configType不一致的情况
This commit is contained in:
parent
56b211cc6c
commit
2b4b127e4a
@ -1148,6 +1148,15 @@ public class SIPCommander implements ISIPCommander {
|
||||
if (code == ErrorCode.SUCCESS.getCode() && data instanceof Element) {
|
||||
Element responseElement = (Element) data;
|
||||
Element configElement = responseElement.element(configType);
|
||||
if (configElement == null) {
|
||||
// 兼容部分宇视设备ElementName和configType不一致的情况
|
||||
for (Element child : responseElement.elements()) {
|
||||
if (child.element("Item") != null) {
|
||||
configElement = child;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (configElement != null) {
|
||||
try {
|
||||
T result = configClass.getDeclaredConstructor().newInstance();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user