From 62f716be9cd1cee2a5fba566db3fcd43bd9fc4cc Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 03 四月 2024 15:04:33 +0800
Subject: [PATCH] 添加idea logo
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
old mode 100644
new mode 100755
index d52f4f6..7cbfe70
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/SIPRequestProcessorParent.java
@@ -3,6 +3,7 @@
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.transmit.SIPSender;
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
+import com.google.common.primitives.Bytes;
import gov.nist.javax.sip.message.SIPRequest;
import gov.nist.javax.sip.message.SIPResponse;
import org.apache.commons.lang3.ArrayUtils;
@@ -81,6 +82,7 @@
return responseAck(sipRequest, statusCode, msg, null);
}
+
public SIPResponse responseAck(SIPRequest sipRequest, int statusCode, String msg, ResponseAckExtraParam responseAckExtraParam) throws SipException, InvalidArgumentException, ParseException {
if (sipRequest.getToHeader().getTag() == null) {
sipRequest.getToHeader().setTag(SipUtils.getNewTag());
@@ -123,6 +125,8 @@
return response;
}
+
+
/**
* 鍥炲甯dp鐨�200
*/
@@ -140,7 +144,10 @@
responseAckExtraParam.content = sdp;
responseAckExtraParam.sipURI = sipURI;
- return responseAck(request, Response.OK, null, responseAckExtraParam);
+ SIPResponse sipResponse = responseAck(request, Response.OK, null, responseAckExtraParam);
+
+
+ return sipResponse;
}
/**
@@ -173,7 +180,8 @@
reader.setEncoding(charset);
// 瀵规捣搴峰嚭鐜扮殑鏈浆涔夊瓧绗﹀仛澶勭悊銆�
String[] destStrArray = new String[]{"<",">","&","'","""};
- char despChar = '&'; // 鎴栬鍙墿灞曞吋瀹瑰叾浠栧瓧绗�
+ // 鎴栬鍙墿灞曞吋瀹瑰叾浠栧瓧绗�
+ char despChar = '&';
byte destBye = (byte) despChar;
List<Byte> result = new ArrayList<>();
byte[] rawContent = request.getRawContent();
@@ -196,15 +204,14 @@
result.add(rawContent[i]);
}
}
- Byte[] bytes = new Byte[0];
- byte[] bytesResult = ArrayUtils.toPrimitive(result.toArray(bytes));
+ byte[] bytesResult = Bytes.toArray(result);
Document xml;
try {
xml = reader.read(new ByteArrayInputStream(bytesResult));
}catch (DocumentException e) {
- logger.warn("[xml瑙f瀽寮傚父]锛� 鎰挎枃濡備笅锛� \r\n{}", new String(bytesResult));
- logger.warn("[xml瑙f瀽寮傚父]锛� 鎰挎枃濡備笅锛� 灏濊瘯鍏煎鎬у鐞�");
+ logger.warn("[xml瑙f瀽寮傚父]锛� 鍘熸枃濡備笅锛� \r\n{}", new String(bytesResult));
+ logger.warn("[xml瑙f瀽寮傚父]锛� 鍘熸枃濡備笅锛� 灏濊瘯鍏煎鎬у鐞�");
String[] xmlLineArray = new String(bytesResult).split("\\r?\\n");
// 鍏煎娴峰悍鐨刟ddress瀛楁甯︽湁<鐮存崲xml缁撴瀯瀵艰嚧鏃犳硶瑙f瀽xml鐨勯棶棰�
@@ -220,4 +227,5 @@
return xml.getRootElement();
}
+
}
--
Gitblit v1.8.0