Commit 6968839f21fb05bf6e3204c2040ee47130006cd0

Authored by panlinlin
1 parent 418e441d

修复空指针异常

src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
@@ -289,6 +289,10 @@ public class SIPCommander implements ISIPCommander { @@ -289,6 +289,10 @@ public class SIPCommander implements ISIPCommander {
289 } 289 }
290 String streamMode = device.getStreamMode().toUpperCase(); 290 String streamMode = device.getStreamMode().toUpperCase();
291 MediaServerConfig mediaInfo = storager.getMediaInfo(); 291 MediaServerConfig mediaInfo = storager.getMediaInfo();
  292 + if (mediaInfo == null) {
  293 + logger.warn("点播时发现ZLM尚未连接...");
  294 + return;
  295 + }
292 String mediaPort = null; 296 String mediaPort = null;
293 // 使用动态udp端口 297 // 使用动态udp端口
294 if (rtpEnable) { 298 if (rtpEnable) {
@@ -347,8 +351,6 @@ public class SIPCommander implements ISIPCommander { @@ -347,8 +351,6 @@ public class SIPCommander implements ISIPCommander {
347 storager.updateChannel(device.getDeviceId(), deviceChannel); 351 storager.updateChannel(device.getDeviceId(), deviceChannel);
348 } 352 }
349 353
350 - // TODO 订阅SIP response,处理对方的错误返回  
351 -  
352 354
353 } catch ( SipException | ParseException | InvalidArgumentException e) { 355 } catch ( SipException | ParseException | InvalidArgumentException e) {
354 e.printStackTrace(); 356 e.printStackTrace();