瀏覽代碼

- fixed via->alias not translated bug in tm/sip_msg.c via_body_cloner (not criticial)
- fixed parse_via, rport set instead of i (critical, could cause core dumps
in some configuration involving tcp and would also open an extra tcp
connection for replies, if stateless mode is used)
- Makefile*: version number increase and excluded cpl-c and pa from
compilation (they depend on libxml2, use make include="cpl-c pa" if you want
to compile them)

Andrei Pelinescu-Onciul 21 年之前
父節點
當前提交
74f6d2e34a
共有 5 個文件被更改,包括 10 次插入2 次删除
  1. 1 0
      Makefile
  2. 1 1
      Makefile.defs
  3. 4 0
      modules/tm/sip_msg.c
  4. 2 1
      parser/parse_via.c
  5. 2 0
      parser/parse_via.h

+ 1 - 0
Makefile

@@ -47,6 +47,7 @@ exclude_modules?= 			cpl ext extcmd \
 							postgres snmp \
 							im radius_acc radius_auth \
 							jabber \
+							cpl-c pa \
 							auth_radius group_radius uri_radius 
 # always exclude the CVS dir
 override exclude_modules+= CVS $(skip_modules)

+ 1 - 1
Makefile.defs

@@ -45,7 +45,7 @@ export makefile_defs
 VERSION = 0
 PATCHLEVEL = 8
 SUBLEVEL =   13
-EXTRAVERSION = -dev-27-unixsock
+EXTRAVERSION = -dev-28
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")

+ 4 - 0
modules/tm/sip_msg.c

@@ -45,6 +45,7 @@
  *  2003-04-04  parsed uris are recalculated on cloning (jiri)
  *  2003-05-07  received, rport & i via shortcuts are also translated (andrei)
  *  2003-11-11  updated cloning of lump_rpl (bogdan)
+ *  2004-03-31  alias shortcuts are also translated (andrei)
  */
 
 #include "defs.h"
@@ -150,6 +151,9 @@ inline struct via_body* via_body_cloner( char* new_buf,
 					case PARAM_I:
 							new_via->i = new_vp;
 							break;
+					case PARAM_ALIAS:
+							new_via->alias = new_vp;
+							break;
 				}
 
 				if (last_new_vp)

+ 2 - 1
parser/parse_via.c

@@ -46,6 +46,7 @@
  *  2003-07-02  added support for TLS parsing in via (andrei)
  *  2003-10-27  added support for alias via param parsing [see
  *               draft-ietf-sip-connect-reuse-00.txt.]  (andrei)
+ *  2004-03-31  fixed rport set instead of i bug (andrei)
  */
 
 
@@ -1863,7 +1864,7 @@ parse_again:
 								vb->rport=param;
 								break;
 							case PARAM_I:
-								vb->rport=param;
+								vb->i=param;
 								break;
 							case PARAM_ALIAS:
 								vb->alias=param;

+ 2 - 0
parser/parse_via.h

@@ -43,6 +43,7 @@
 
 /* via param types
  * WARNING: keep in sync with parse_via.c FIN_HIDDEN... 
+ * and with tm/sip_msg.c via_body_cloner
  */
 enum {
 	PARAM_HIDDEN=230, PARAM_TTL, PARAM_BRANCH, 
@@ -66,6 +67,7 @@ struct via_param {
 
 
 /* Format: name/version/transport host:port;params comment */
+ /* WARNING: keep in sync with tm/sip_msg.c via_body_cloner */
 struct via_body { 
 	int error;
 	str hdr;   /* Contains "Via" or "v" */