瀏覽代碼

-more port order fixes (seems I overwritten a file with the old version...)

Andrei Pelinescu-Onciul 22 年之前
父節點
當前提交
efb5f4b4fb
共有 3 個文件被更改,包括 5 次插入3 次删除
  1. 1 1
      Makefile.defs
  2. 3 2
      forward.h
  3. 1 0
      ip_addr.h

+ 1 - 1
Makefile.defs

@@ -18,7 +18,7 @@
 VERSION = 0
 PATCHLEVEL = 8
 SUBLEVEL =   11
-EXTRAVERSION = pre12
+EXTRAVERSION = pre13
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")

+ 3 - 2
forward.h

@@ -30,6 +30,7 @@
  * 2001-??-?? created by andrei
  * ????-??-?? lots of changes by a lot of people
  * 2003-02-11 added inline msg_send (andrei)
+ * 2003-04-07 changed all ports to host byte order (andrei)
  */
 
 
@@ -60,8 +61,8 @@ int update_sock_struct_from_via( union sockaddr_union* to,
 /* use src_ip, port=src_port if rport, via port if via port, 5060 otherwise */
 #define update_sock_struct_from_ip(  to, msg ) \
 	init_su((to), &(msg)->rcv.src_ip, \
-			((msg)->via1->rport)?htons((msg)->rcv.src_port): \
-			((msg)->via1->port)?htons((msg)->via1->port): htons(SIP_PORT) )
+			((msg)->via1->rport)?(msg)->rcv.src_port: \
+			((msg)->via1->port)?(msg)->via1->port: SIP_PORT )
 
 int forward_reply( struct sip_msg* msg);
 

+ 1 - 0
ip_addr.h

@@ -29,6 +29,7 @@
  * History:
  * --------
  *  2003-02-13  added struct dest_info (andrei)
+ *  2003-04-06  all ports are stored/passed in host byte order now (andrei)
  */
 
 #ifndef ip_addr_h