Browse code

- forward ported all the compile/warning fixes from 0.8.14

Andrei Pelinescu-Onciul authored on 17/07/2004 19:02:18
Showing 8 changed files
... ...
@@ -45,7 +45,7 @@ export makefile_defs
45 45
 VERSION = 0
46 46
 PATCHLEVEL = 8
47 47
 SUBLEVEL =   13
48
-EXTRAVERSION = -dev-33-usrloc
48
+EXTRAVERSION = -dev-34
49 49
 
50 50
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
51 51
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -1,6 +1,11 @@
1 1
 $Id$
2 2
 
3 3
 ( - todo, x - done)
4
+- apply & modify Maxim's server_name patch
5
+- change subst_run/str to return error (different from not found)
6
+- change subst_user as on serdev
7
+- tm : fake_env: fake also bind_address (else the default will be used
8
+ in the failure route)
4 9
 - [core] parse_uri support for new uri params
5 10
 - [core] on sig_child, kill the processes if they don't exit in a 
6 11
   reasonable time
... ...
@@ -8,7 +8,8 @@
8 8
 Exceptions:
9 9
  a. compilation (this includes warning) fixes
10 10
  b. bug fixes
11
- c. small changes due to a new release in the very near future (allowed only for the release manager)
11
+ c. api changes (some external functions definitions change)
12
+ d. small changes due to a new release in the very near future (allowed only for the release manager)
12 13
 
13 14
 
14 15
 2. Code requirements
... ...
@@ -536,7 +536,7 @@ int forward_reply(struct sip_msg* msg)
536 536
 		|| (msg->via2==0) || (msg->via2->error!=PARSE_OK))
537 537
 	{
538 538
 		/* no second via => error */
539
-		LOG(L_ERR, "ERROR: forward_msg: no 2nd via found in reply\n");
539
+		LOG(L_ERR, "ERROR: forward_reply: no 2nd via found in reply\n");
540 540
 		goto error;
541 541
 	}
542 542
 
... ...
@@ -383,15 +383,15 @@ static inline int hostent2su( union sockaddr_union* su,
383 383
 	return 0;
384 384
 }
385 385
 
386
-
387
-
386
+/* maximum size of a str returned by ip_addr2a (including \0) */
387
+#define IP_ADDR_MAX_STR_SIZE 40 /* 1234:5678:9012:3456:7890:1234:5678:9012\0 */
388 388
 /* fast ip_addr -> string convertor;
389 389
  * it uses an internal buffer
390 390
  */
391 391
 static inline char* ip_addr2a(struct ip_addr* ip)
392 392
 {
393 393
 
394
-	static char buff[40];/* 1234:5678:9012:3456:7890:1234:5678:9012\0 */
394
+	static char buff[IP_ADDR_MAX_STR_SIZE];
395 395
 	int offset;
396 396
 	register unsigned char a,b,c;
397 397
 #ifdef USE_IPV6
... ...
@@ -1243,10 +1243,12 @@ int t_lookup_callid(struct cell ** trans, str callid, str cseq) {
1243 1243
 
1244 1244
 	/* create header fields the same way tm does itself, then compare headers */
1245 1245
 	endpos = print_callid_mini(callid_header, callid);
1246
-	DBG("created comparable call_id header field: >%.*s<\n", endpos - callid_header, callid_header); 
1246
+	DBG("created comparable call_id header field: >%.*s<\n", 
1247
+			(int)(endpos - callid_header), callid_header); 
1247 1248
 
1248 1249
 	endpos = print_cseq_mini(cseq_header, &cseq, &invite_method);
1249
-	DBG("created comparable cseq header field: >%.*s<\n", endpos - cseq_header, cseq_header); 
1250
+	DBG("created comparable cseq header field: >%.*s<\n", 
1251
+			(int)(endpos - cseq_header), cseq_header); 
1250 1252
 
1251 1253
 	LOCK_HASH(hash_index);
1252 1254
 	DBG("just locked hash index %u, looking for transactions there:\n", hash_index);
... ...
@@ -393,7 +393,7 @@ char* id_builder(struct sip_msg* msg, unsigned int *id_len)
393 393
 
394 394
 
395 395
 
396
-char* clen_builder(struct sip_msg* msg, unsigned int *clen_len, int diff)
396
+char* clen_builder(struct sip_msg* msg, int *clen_len, int diff)
397 397
 {
398 398
 	char* buf;
399 399
 	int len;
... ...
@@ -184,7 +184,7 @@ static int tcp_blocking_connect(int fd, const struct sockaddr *servaddr,
184 184
 	struct timeval timeout;
185 185
 	int ticks;
186 186
 	int err;
187
-	int err_len;
187
+	unsigned int err_len;
188 188
 	
189 189
 again:
190 190
 	n=connect(fd, servaddr, addrlen);