Browse Source

- tcp fix prted from stable

Andrei Pelinescu-Onciul 22 years ago
parent
commit
4776dc1104
3 changed files with 15 additions and 4 deletions
  1. 1 1
      Makefile.defs
  2. 6 2
      TODO
  3. 8 1
      receive.c

+ 1 - 1
Makefile.defs

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

+ 6 - 2
TODO

@@ -108,7 +108,7 @@ optimizations:
 - assembly for some very common used function
 - assembly for some very common used function
 - getsock* cache
 - getsock* cache
 - fd cache for tcp_send
 - fd cache for tcp_send
-- dns cache?
+- dns cache? (see DNS)
 
 
 
 
 tcp stuff:
 tcp stuff:
@@ -126,4 +126,8 @@ tm optimizations:
   build_uac_request, build_uac_request_dlg, t_uac, t_uac_dlg
   build_uac_request, build_uac_request_dlg, t_uac, t_uac_dlg
 - uri2proxy - t_uac_dlg => extra malloc/free (no üroxy needed here)
 - uri2proxy - t_uac_dlg => extra malloc/free (no üroxy needed here)
   
   
-
+dns stuff:
+ - dns cache
+ - support for NAPTR (naptr(domain, pref_proto)=> srv_rec + proto => srv(srv_rec, proto) => A or AAAA => A/AAAA(name))
+ - support for fallback (inside the same A/AAAA record, other ip; if fails => other SRV ; if it fails too other NAPTR
+[see rfc3263]

+ 8 - 1
receive.c

@@ -32,6 +32,7 @@
  * 2003-02-07 undoed jiri's zero term. changes (they break tcp) (andrei)
  * 2003-02-07 undoed jiri's zero term. changes (they break tcp) (andrei)
  * 2003-02-10 moved zero-term in the calling functions (udp_receive &
  * 2003-02-10 moved zero-term in the calling functions (udp_receive &
  *            tcp_read_req)
  *            tcp_read_req)
+ * 2003-08-13 fixed exec_pre_cb returning 0 (backported from stable) (andrei)
  */
  */
 
 
 
 
@@ -66,6 +67,7 @@ unsigned int msg_no=0;
 int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info) 
 int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info) 
 {
 {
 	struct sip_msg* msg;
 	struct sip_msg* msg;
+	int ret;
 #ifdef STATS
 #ifdef STATS
 	int skipped = 1;
 	int skipped = 1;
 	struct timeval tvb, tve;	
 	struct timeval tvb, tve;	
@@ -102,7 +104,11 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 	/* if some of the callbacks said not to continue with
 	/* if some of the callbacks said not to continue with
 	   script processing, don't do so
 	   script processing, don't do so
 	*/
 	*/
-	if (exec_pre_cb(msg)==0) goto error;
+	ret=exec_pre_cb(msg);
+	if (ret<=0){
+		if (ret<0) goto error;
+		else goto end; /* drop the message -- no error -- andrei */
+	}
 
 
 	/* ... and clear branches from previous message */
 	/* ... and clear branches from previous message */
 	clear_branches();
 	clear_branches();
@@ -170,6 +176,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 		DBG("succesfully ran reply processing...(%d usec)\n", diff);
 		DBG("succesfully ran reply processing...(%d usec)\n", diff);
 #endif
 #endif
 	}
 	}
+end:
 #ifdef STATS
 #ifdef STATS
 	skipped = 0;
 	skipped = 0;
 #endif
 #endif