소스 검색

Kamailio compatibility: function reset_dst_uri

Jan Janak 16 년 전
부모
커밋
07689d3a86
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      parser/msg_parser.c
  2. 2 0
      parser/msg_parser.h

+ 10 - 0
parser/msg_parser.c

@@ -728,3 +728,13 @@ int set_dst_uri(struct sip_msg* msg, str* uri)
 	}
 	return 0;
 }
+
+
+void reset_dst_uri(struct sip_msg* msg)
+{
+	if(msg->dst_uri.s != 0) {
+		pkg_free(msg->dst_uri.s);
+	}
+	msg->dst_uri.s = 0;
+	msg->dst_uri.len = 0;
+}

+ 2 - 0
parser/msg_parser.h

@@ -407,5 +407,7 @@ inline static char* get_body(struct sip_msg *msg)
  */
 int set_dst_uri(struct sip_msg* msg, str* uri);
 
+/* If the dst_uri is set to an URI then reset it */
+void reset_dst_uri(struct sip_msg* msg);
 
 #endif