Commit ab34cb37f33f8a64df206c18d7fc5b970be5d0cb
1 parent
695f9b7f
修复空指针异常
Showing
2 changed files
with
6 additions
and
0 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -611,6 +611,10 @@ public class SIPCommander implements ISIPCommander { |
| 611 | 611 | */ |
| 612 | 612 | @Override |
| 613 | 613 | public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException { |
| 614 | + if (device == null) { | |
| 615 | + logger.warn("[发送BYE] device为null"); | |
| 616 | + return; | |
| 617 | + } | |
| 614 | 618 | SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, callId, stream); |
| 615 | 619 | if (ssrcTransaction == null) { |
| 616 | 620 | throw new SsrcTransactionNotFoundException(device.getDeviceId(), channelId, callId, stream); | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
| 1 | 1 | package com.genersoft.iot.vmp.storager.impl; |
| 2 | 2 | |
| 3 | +import com.baomidou.dynamic.datasource.annotation.DS; | |
| 3 | 4 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 4 | 5 | import com.genersoft.iot.vmp.conf.UserSetting; |
| 5 | 6 | import com.genersoft.iot.vmp.gb28181.bean.*; |
| ... | ... | @@ -38,6 +39,7 @@ import java.util.concurrent.ConcurrentHashMap; |
| 38 | 39 | */ |
| 39 | 40 | @SuppressWarnings("rawtypes") |
| 40 | 41 | @Component |
| 42 | +@DS("master") | |
| 41 | 43 | public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 42 | 44 | |
| 43 | 45 | private final Logger logger = LoggerFactory.getLogger(VideoManagerStorageImpl.class); | ... | ... |