Browse code

- tcp fix prted from stable

Andrei Pelinescu-Onciul authored on 13/08/2003 18:03:43
Showing 3 changed files
... ...
@@ -40,7 +40,7 @@ export makefile_defs
40 40
 VERSION = 0
41 41
 PATCHLEVEL = 8
42 42
 SUBLEVEL =   12
43
-EXTRAVERSION = dev-t11
43
+EXTRAVERSION = dev-t12
44 44
 
45 45
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
46 46
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -108,7 +108,7 @@ optimizations:
108 108
 - assembly for some very common used function
109 109
 - getsock* cache
110 110
 - fd cache for tcp_send
111
-- dns cache?
111
+- dns cache? (see DNS)
112 112
 
113 113
 
114 114
 tcp stuff:
... ...
@@ -126,4 +126,8 @@ tm optimizations:
126 126
   build_uac_request, build_uac_request_dlg, t_uac, t_uac_dlg
127 127
 - uri2proxy - t_uac_dlg => extra malloc/free (no �roxy needed here)
128 128
   
129
-
129
+dns stuff:
130
+ - dns cache
131
+ - support for NAPTR (naptr(domain, pref_proto)=> srv_rec + proto => srv(srv_rec, proto) => A or AAAA => A/AAAA(name))
132
+ - support for fallback (inside the same A/AAAA record, other ip; if fails => other SRV ; if it fails too other NAPTR
133
+[see rfc3263]
... ...
@@ -32,6 +32,7 @@
32 32
  * 2003-02-07 undoed jiri's zero term. changes (they break tcp) (andrei)
33 33
  * 2003-02-10 moved zero-term in the calling functions (udp_receive &
34 34
  *            tcp_read_req)
35
+ * 2003-08-13 fixed exec_pre_cb returning 0 (backported from stable) (andrei)
35 36
  */
36 37
 
37 38
 
... ...
@@ -66,6 +67,7 @@ unsigned int msg_no=0;
66 67
 int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info) 
67 68
 {
68 69
 	struct sip_msg* msg;
70
+	int ret;
69 71
 #ifdef STATS
70 72
 	int skipped = 1;
71 73
 	struct timeval tvb, tve;	
... ...
@@ -102,7 +104,11 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
102 104
 	/* if some of the callbacks said not to continue with
103 105
 	   script processing, don't do so
104 106
 	*/
105
-	if (exec_pre_cb(msg)==0) goto error;
107
+	ret=exec_pre_cb(msg);
108
+	if (ret<=0){
109
+		if (ret<0) goto error;
110
+		else goto end; /* drop the message -- no error -- andrei */
111
+	}
106 112
 
107 113
 	/* ... and clear branches from previous message */
108 114
 	clear_branches();
... ...
@@ -170,6 +176,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
170 176
 		DBG("succesfully ran reply processing...(%d usec)\n", diff);
171 177
 #endif
172 178
 	}
179
+end:
173 180
 #ifdef STATS
174 181
 	skipped = 0;
175 182
 #endif