Browse code

- updated NEWS - tcp debugging code

Andrei Pelinescu-Onciul authored on 28/01/2003 16:27:23
Showing 2 changed files
... ...
@@ -35,6 +35,9 @@ New features
35 35
 - improved tm/FIFO (external applications, such as
36 36
   click-to-dial can now better initiate transactions)
37 37
   [tm module]
38
+- powerpc fast locking support
39
+- netbsd support
40
+- 64 bits arch. support (e.g. netbsd/sparc64).
38 41
 
39 42
 Changes to use of ser scripts
40 43
 =============================
... ...
@@ -418,7 +418,8 @@ void release_tcpconn(struct tcp_connection* c, long state, int unix_sock)
418 418
 {
419 419
 	long response[2];
420 420
 	
421
-		DBG( "releasing con %p, state %ld\n", c, state );
421
+		DBG( "releasing con %p, state %ld, fd=%d, id=%d\n",
422
+				c, state, c->fd, c->id);
422 423
 		/* release req & signal the parent */
423 424
 		if (c->fd!=-1) close(c->fd);
424 425
 		/* errno==EINTR, EWOULDBLOCK a.s.o todo */
... ...
@@ -457,6 +458,14 @@ void tcp_receive_loop(int unix_sock)
457 457
 			timeout.tv_usec=0;
458 458
 			sel_set=master_set;
459 459
 			nfds=select(maxfd+1, &sel_set, 0 , 0 , &timeout);
460
+			DBG("tcp receive: out of select: nfds=%d, errno=%d (%s),"
461
+					         " timeout=%d, master_set=%x, sel_set=%x\n",
462
+					nfds, errno, strerror(errno), timeout.tv_sec, master_set, 
463
+					sel_set);
464
+			for (n=0; n<maxfd; n++){
465
+				if (FD_ISSET(n, &sel_set)) 
466
+					DBG("tcp receive: FD %d is set\n", n);
467
+			}
460 468
 			if (nfds<0){
461 469
 				if (errno==EINTR) continue; /* just a signal */
462 470
 				/* errors */
... ...
@@ -465,6 +474,7 @@ void tcp_receive_loop(int unix_sock)
465 465
 				continue;
466 466
 			}
467 467
 			if (FD_ISSET(unix_sock, &sel_set)){
468
+				DBG("tcp receive: receiving fd from from 'main'\n");
468 469
 				nfds--;
469 470
 				/* a new conn from "main" */
470 471
 				n=receive_fd(unix_sock, &con, sizeof(con), &s);
... ...
@@ -503,11 +513,16 @@ void tcp_receive_loop(int unix_sock)
503 503
 			ticks=get_ticks();
504 504
 			for (con=list; con ; con=c_next){
505 505
 				c_next=con->c_next; /* safe for removing*/
506
+				DBG("tcp receive: list fd=%d, id=%d, timeout=%d, refcnt=%d\n",
507
+						con->fd, con->id, con->timeout, con->refcnt);
506 508
 				if (nfds && FD_ISSET(con->fd, &sel_set)){
509
+					DBG("tcp receive: match, fd:isset\n");
507 510
 					nfds--;
508 511
 					resp=tcp_read_req(con);
509 512
 					if (resp<0){
510 513
 						FD_CLR(con->fd, &master_set);
514
+						DBG("tcp receive: FD_CLR %d, id=%d\n",
515
+								con->fd,	con->id);
511 516
 						tcpconn_listrm(list, con, c_next, c_prev);
512 517
 						release_tcpconn(con, resp, unix_sock);
513 518
 					}else{
... ...
@@ -522,6 +537,8 @@ void tcp_receive_loop(int unix_sock)
522 522
 								con, con->timeout, ticks);
523 523
 						resp=CONN_RELEASE;
524 524
 						FD_CLR(con->fd, &master_set);
525
+						DBG("tcp receive: FD_CLR %d, id=%d\n",
526
+								con->fd,	con->id);
525 527
 						tcpconn_listrm(list, con, c_next, c_prev);
526 528
 						release_tcpconn(con, resp, unix_sock);
527 529
 					}