Browse Source

- minor tcp BUG case fix/cleanup

Andrei Pelinescu-Onciul 22 years ago
parent
commit
75e2f1a600
3 changed files with 12 additions and 9 deletions
  1. 8 7
      TODO
  2. 1 1
      resolve.c
  3. 3 1
      tcp_main.c

+ 8 - 7
TODO

@@ -2,11 +2,12 @@ $Id$
 
 ( - todo, x - done)
 
+x tcp_main_loop: BUG cases should "conitnue;"
 - change len_gt into and expr (e.g msg:len).
 - sipit: uri == myself doesn't match tls port = 5061
 - sipit: fix check_self & *_alias to work with tcp & tls
 x sipit: fix ipv6 references in check_self
-- regex subst on uris?
+x regex subst on uris?
 x port receive.c pre_script_cb fix from stable
 - extend alias to include port numbers :
     something like alias= foo1.bar:5080 foo2.bar foo3.bar:*
@@ -14,12 +15,12 @@ x port receive.c pre_script_cb fix from stable
        tcp foo.bar:5063, udp foo.bar:5062, foo2.bar
 
 release:
-- backport: tcp conn id fix to stable + destroy_tcp 
-- backport: acc mem. leak fixes
-- backport: dns mem. leak fixes (resolve.[ch])
-- backport: id_builder receive_msg mem. leak (receive.c)
-- backport: check_self ipv6/case fixes (forward.c)
-- change tcp timeouts to 2 or 3 min?
+x backport: tcp conn id fix to stable + destroy_tcp 
+x backport: acc mem. leak fixes
+x backport: dns mem. leak fixes (resolve.[ch])
+x backport: id_builder receive_msg mem. leak (msg_translator.c)
+x backport: check_self ipv6/case fixes (forward.c)
+x change tcp timeouts to 2 or 3 min?
 x check via ipv6 fixes and backport to stable
 x fix kill(0, SIGTERM) on startup error (will kill also the launching shell
  if non-interactive)

+ 1 - 1
resolve.c

@@ -530,7 +530,7 @@ struct hostent* sip_resolvehost(str* name, unsigned short* port, int proto)
 				}
 			}
 			if (head) free_rdata_list(head); /*clean up*/
-			DBG("sip_resolvehost: not SRV record found for %.*s," 
+			DBG("sip_resolvehost: no SRV record found for %.*s," 
 					" trying 'normal' lookup...\n", name->len, name->s);
 		}
 	}

+ 3 - 1
tcp_main.c

@@ -815,13 +815,15 @@ read_again:
 					LOG(L_CRIT, "BUG: tcp_main_loop: dead child %d\n", r);
 					/* don't listen on it any more */
 					FD_CLR(pt[r].unix_sock, &master_set);
-					/*exit(-1)*/;
+					/*exit(-1);*/
+					continue;
 				}else if (bytes<0){
 					if (errno==EINTR) goto read_again;
 					else{
 						LOG(L_CRIT, "ERROR: tcp_main_loop: read from child: "
 								" %s\n", strerror(errno));
 						/* try to continue ? */
+						continue;
 					}
 				}