Browse code

- removed lots of debugging messages

Andrei Pelinescu-Onciul authored on 29/01/2003 16:31:48
Showing 1 changed files
... ...
@@ -458,14 +458,12 @@ void tcp_receive_loop(int unix_sock)
458 458
 			timeout.tv_usec=0;
459 459
 			sel_set=master_set;
460 460
 			nfds=select(maxfd+1, &sel_set, 0 , 0 , &timeout);
461
-			DBG("tcp receive: out of select: nfds=%d, errno=%d (%s),"
462
-					         " timeout=%d, master_set=%x, sel_set=%x\n",
463
-					nfds, errno, strerror(errno), timeout.tv_sec, master_set, 
464
-					sel_set);
461
+#ifdef EXTRA_DEBUG
465 462
 			for (n=0; n<maxfd; n++){
466 463
 				if (FD_ISSET(n, &sel_set)) 
467 464
 					DBG("tcp receive: FD %d is set\n", n);
468 465
 			}
466
+#endif
469 467
 			if (nfds<0){
470 468
 				if (errno==EINTR) continue; /* just a signal */
471 469
 				/* errors */
... ...
@@ -513,16 +511,18 @@ void tcp_receive_loop(int unix_sock)
513 511
 			ticks=get_ticks();
514 512
 			for (con=list; con ; con=c_next){
515 513
 				c_next=con->c_next; /* safe for removing*/
514
+#ifdef EXTRA_DEBUG
516 515
 				DBG("tcp receive: list fd=%d, id=%d, timeout=%d, refcnt=%d\n",
517 516
 						con->fd, con->id, con->timeout, con->refcnt);
517
+#endif
518 518
 				if (nfds && FD_ISSET(con->fd, &sel_set)){
519
+#ifdef EXTRA_DEBUG
519 520
 					DBG("tcp receive: match, fd:isset\n");
521
+#endif
520 522
 					nfds--;
521 523
 					resp=tcp_read_req(con);
522 524
 					if (resp<0){
523 525
 						FD_CLR(con->fd, &master_set);
524
-						DBG("tcp receive: FD_CLR %d, id=%d\n",
525
-								con->fd,	con->id);
526 526
 						tcpconn_listrm(list, con, c_next, c_prev);
527 527
 						release_tcpconn(con, resp, unix_sock);
528 528
 					}else{
... ...
@@ -537,8 +537,6 @@ void tcp_receive_loop(int unix_sock)
537 537
 								con, con->timeout, ticks);
538 538
 						resp=CONN_RELEASE;
539 539
 						FD_CLR(con->fd, &master_set);
540
-						DBG("tcp receive: FD_CLR %d, id=%d\n",
541
-								con->fd,	con->id);
542 540
 						tcpconn_listrm(list, con, c_next, c_prev);
543 541
 						release_tcpconn(con, resp, unix_sock);
544 542
 					}