Browse Source

- received contains an ipv6 address and not an ipv6 reference (thanks to
Stefan)

Andrei Pelinescu-Onciul 22 years ago
parent
commit
0cbace852c
3 changed files with 3 additions and 11 deletions
  1. 1 1
      Makefile.defs
  2. 1 1
      TODO
  3. 1 9
      msg_translator.c

+ 1 - 1
Makefile.defs

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

+ 1 - 1
TODO

@@ -4,7 +4,7 @@ $Id$
 
 release:
 - fix CC_VER bug in newer Makefile (move DEFS after CC?)
-- openbsd 3.2 packages -> doc in share/doc (and not in doc)
+x openbsd 3.2 packages -> doc in share/doc (and not in doc)
 - openbsd 3.2 -> add jabber and mysql to the package
 x fix modules makefiles (so that cd modules/foo; make will also link the proper
    libs)

+ 1 - 9
msg_translator.c

@@ -279,9 +279,7 @@ char* received_builder(struct sip_msg *msg, unsigned int *received_len)
 	struct ip_addr *source_ip;
 	char *tmp;
 	int  tmp_len;
-	int extra_len;
 
-	extra_len = 0;
 	source_ip=&msg->rcv.src_ip;
 
 	buf=pkg_malloc(sizeof(char)*MAX_RECEIVED_SIZE);
@@ -295,14 +293,8 @@ char* received_builder(struct sip_msg *msg, unsigned int *received_len)
 		return 0; /* error*/
 	tmp_len=strlen(tmp);
 	len=RECEIVED_LEN+tmp_len;
-	if(source_ip->af==AF_INET6){
-		len+=2;
-		buf[RECEIVED_LEN]='[';
-		buf[RECEIVED_LEN+tmp_len+1]=']';
-		extra_len=1;
-	}
 	
-	memcpy(buf+RECEIVED_LEN+extra_len, tmp, tmp_len);
+	memcpy(buf+RECEIVED_LEN, tmp, tmp_len);
 	buf[len]=0; /*null terminate it */
 
 	*received_len = len;