소스 검색

- forward ported all the compile/warning fixes from 0.8.14

Andrei Pelinescu-Onciul 21 년 전
부모
커밋
a9fae28b8e
8개의 변경된 파일18개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 1
      Makefile.defs
  2. 5 0
      TODO
  3. 2 1
      doc/cvs-commit-rules.txt
  4. 1 1
      forward.c
  5. 3 3
      ip_addr.h
  6. 4 2
      modules/tm/t_lookup.c
  7. 1 1
      msg_translator.c
  8. 1 1
      tcp_main.c

+ 1 - 1
Makefile.defs

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

+ 5 - 0
TODO

@@ -1,6 +1,11 @@
 $Id$
 
 ( - todo, x - done)
+- apply & modify Maxim's server_name patch
+- change subst_run/str to return error (different from not found)
+- change subst_user as on serdev
+- tm : fake_env: fake also bind_address (else the default will be used
+ in the failure route)
 - [core] parse_uri support for new uri params
 - [core] on sig_child, kill the processes if they don't exit in a 
   reasonable time

+ 2 - 1
doc/cvs-commit-rules.txt

@@ -8,7 +8,8 @@
 Exceptions:
  a. compilation (this includes warning) fixes
  b. bug fixes
- c. small changes due to a new release in the very near future (allowed only for the release manager)
+ c. api changes (some external functions definitions change)
+ d. small changes due to a new release in the very near future (allowed only for the release manager)
 
 
 2. Code requirements

+ 1 - 1
forward.c

@@ -536,7 +536,7 @@ int forward_reply(struct sip_msg* msg)
 		|| (msg->via2==0) || (msg->via2->error!=PARSE_OK))
 	{
 		/* no second via => error */
-		LOG(L_ERR, "ERROR: forward_msg: no 2nd via found in reply\n");
+		LOG(L_ERR, "ERROR: forward_reply: no 2nd via found in reply\n");
 		goto error;
 	}
 

+ 3 - 3
ip_addr.h

@@ -383,15 +383,15 @@ static inline int hostent2su( union sockaddr_union* su,
 	return 0;
 }
 
-
-
+/* maximum size of a str returned by ip_addr2a (including \0) */
+#define IP_ADDR_MAX_STR_SIZE 40 /* 1234:5678:9012:3456:7890:1234:5678:9012\0 */
 /* fast ip_addr -> string convertor;
  * it uses an internal buffer
  */
 static inline char* ip_addr2a(struct ip_addr* ip)
 {
 
-	static char buff[40];/* 1234:5678:9012:3456:7890:1234:5678:9012\0 */
+	static char buff[IP_ADDR_MAX_STR_SIZE];
 	int offset;
 	register unsigned char a,b,c;
 #ifdef USE_IPV6

+ 4 - 2
modules/tm/t_lookup.c

@@ -1243,10 +1243,12 @@ int t_lookup_callid(struct cell ** trans, str callid, str cseq) {
 
 	/* create header fields the same way tm does itself, then compare headers */
 	endpos = print_callid_mini(callid_header, callid);
-	DBG("created comparable call_id header field: >%.*s<\n", endpos - callid_header, callid_header); 
+	DBG("created comparable call_id header field: >%.*s<\n", 
+			(int)(endpos - callid_header), callid_header); 
 
 	endpos = print_cseq_mini(cseq_header, &cseq, &invite_method);
-	DBG("created comparable cseq header field: >%.*s<\n", endpos - cseq_header, cseq_header); 
+	DBG("created comparable cseq header field: >%.*s<\n", 
+			(int)(endpos - cseq_header), cseq_header); 
 
 	LOCK_HASH(hash_index);
 	DBG("just locked hash index %u, looking for transactions there:\n", hash_index);

+ 1 - 1
msg_translator.c

@@ -393,7 +393,7 @@ char* id_builder(struct sip_msg* msg, unsigned int *id_len)
 
 
 
-char* clen_builder(struct sip_msg* msg, unsigned int *clen_len, int diff)
+char* clen_builder(struct sip_msg* msg, int *clen_len, int diff)
 {
 	char* buf;
 	int len;

+ 1 - 1
tcp_main.c

@@ -184,7 +184,7 @@ static int tcp_blocking_connect(int fd, const struct sockaddr *servaddr,
 	struct timeval timeout;
 	int ticks;
 	int err;
-	int err_len;
+	unsigned int err_len;
 	
 again:
 	n=connect(fd, servaddr, addrlen);