mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-06-22 11:07:48 +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) {
|
if (code == ErrorCode.SUCCESS.getCode() && data instanceof Element) {
|
||||||
Element responseElement = (Element) data;
|
Element responseElement = (Element) data;
|
||||||
Element configElement = responseElement.element(configType);
|
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) {
|
if (configElement != null) {
|
||||||
try {
|
try {
|
||||||
T result = configClass.getDeclaredConstructor().newInstance();
|
T result = configClass.getDeclaredConstructor().newInstance();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user