|
@@ -56,6 +56,13 @@ public class IPCWithNVRCache {
|
|
try {
|
|
try {
|
|
// 读取IPC信息, 构建缓存
|
|
// 读取IPC信息, 构建缓存
|
|
for (ReqSetServerUriInfo reqSetServerUriInfo : loadNvrIpcInfo(loginHandler, nvrItem)) {
|
|
for (ReqSetServerUriInfo reqSetServerUriInfo : loadNvrIpcInfo(loginHandler, nvrItem)) {
|
|
|
|
+ if (cache.containsKey(reqSetServerUriInfo.getIp())) {
|
|
|
|
+ log.warn("ipc ip repeat: ip-{} , nvr1-{} nvr2-{}",
|
|
|
|
+ reqSetServerUriInfo.getIp(),
|
|
|
|
+ cache.get(reqSetServerUriInfo.getIp()).getNvr().getIp(),
|
|
|
|
+ nvrItem.getIp());
|
|
|
|
+ }
|
|
|
|
+
|
|
cache.put(reqSetServerUriInfo.getIp(), new IPCInfo(reqSetServerUriInfo, nvrItem));
|
|
cache.put(reqSetServerUriInfo.getIp(), new IPCInfo(reqSetServerUriInfo, nvrItem));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -73,7 +80,7 @@ public class IPCWithNVRCache {
|
|
|
|
|
|
private List<ReqSetServerUriInfo> loadNvrIpcInfo(WinDef.DWORD loginHandler,
|
|
private List<ReqSetServerUriInfo> loadNvrIpcInfo(WinDef.DWORD loginHandler,
|
|
NVRConfigurationProperties.NVRItem nvrItem) throws Exception {
|
|
NVRConfigurationProperties.NVRItem nvrItem) throws Exception {
|
|
- int pIPCServerListSize = 4 * 1024 * 1024;
|
|
|
|
|
|
+ int pIPCServerListSize = 2 * 1024 * 1024;
|
|
byte[] pIPCServerList = new byte[pIPCServerListSize];
|
|
byte[] pIPCServerList = new byte[pIPCServerListSize];
|
|
WinDef.UINTByReference nRealSizeRef = new WinDef.UINTByReference(
|
|
WinDef.UINTByReference nRealSizeRef = new WinDef.UINTByReference(
|
|
new WinDef.UINT(pIPCServerListSize));
|
|
new WinDef.UINT(pIPCServerListSize));
|