Browse Source

修正不支持的method处理错误

pull/47/head
Lawrence 4 years ago
parent
commit
b0088b8bd3
  1. 6
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java
  2. 2
      src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/OtherRequestProcessor.java
  3. 1
      web_src/src/components/UiHeader.vue

6
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/SIPProcessorFactory.java

@ -132,7 +132,6 @@ public class SIPProcessorFactory {
processor.setRequestEvent(evt); processor.setRequestEvent(evt);
return processor; return processor;
} else if (Request.MESSAGE.equals(method)) { } else if (Request.MESSAGE.equals(method)) {
MessageRequestProcessor processor = new MessageRequestProcessor(); MessageRequestProcessor processor = new MessageRequestProcessor();
processor.setRequestEvent(evt); processor.setRequestEvent(evt);
processor.setTcpSipProvider(getTcpSipProvider()); processor.setTcpSipProvider(getTcpSipProvider());
@ -146,12 +145,13 @@ public class SIPProcessorFactory {
processor.setRedisCatchStorage(redisCatchStorage); processor.setRedisCatchStorage(redisCatchStorage);
return processor; return processor;
} else { } else {
return new OtherRequestProcessor(); OtherRequestProcessor processor = new OtherRequestProcessor();
processor.setRequestEvent(evt);
return processor;
} }
} }
public ISIPResponseProcessor createResponseProcessor(ResponseEvent evt) { public ISIPResponseProcessor createResponseProcessor(ResponseEvent evt) {
Response response = evt.getResponse(); Response response = evt.getResponse();
CSeqHeader cseqHeader = (CSeqHeader) response.getHeader(CSeqHeader.NAME); CSeqHeader cseqHeader = (CSeqHeader) response.getHeader(CSeqHeader.NAME);
String method = cseqHeader.getMethod(); String method = cseqHeader.getMethod();

2
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/request/impl/OtherRequestProcessor.java

@ -21,7 +21,7 @@ public class OtherRequestProcessor extends SIPRequestAbstractProcessor {
*/ */
@Override @Override
public void process(RequestEvent evt) { public void process(RequestEvent evt) {
System.out.println("no support the method! Method:" + evt.getRequest().getMethod()); System.out.println("Unsupported the method: " + evt.getRequest().getMethod());
} }
} }

1
web_src/src/components/UiHeader.vue

@ -21,7 +21,6 @@ export default {
}; };
}, },
methods:{ methods:{
loginout(){ loginout(){
// cookie // cookie
this.$cookies.remove("session"); this.$cookies.remove("session");

Loading…
Cancel
Save