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 458
 			timeout.tv_usec=0;
458 459
 			sel_set=master_set;
459 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);
465
+			for (n=0; n<maxfd; n++){
466
+				if (FD_ISSET(n, &sel_set)) 
467
+					DBG("tcp receive: FD %d is set\n", n);
468
+			}
460 469
 			if (nfds<0){
461 470
 				if (errno==EINTR) continue; /* just a signal */
462 471
 				/* errors */
... ...
@@ -465,6 +474,7 @@ void tcp_receive_loop(int unix_sock)
465 474
 				continue;
466 475
 			}
467 476
 			if (FD_ISSET(unix_sock, &sel_set)){
477
+				DBG("tcp receive: receiving fd from from 'main'\n");
468 478
 				nfds--;
469 479
 				/* a new conn from "main" */
470 480
 				n=receive_fd(unix_sock, &con, sizeof(con), &s);
... ...
@@ -503,11 +513,16 @@ void tcp_receive_loop(int unix_sock)
503 513
 			ticks=get_ticks();
504 514
 			for (con=list; con ; con=c_next){
505 515
 				c_next=con->c_next; /* safe for removing*/
516
+				DBG("tcp receive: list fd=%d, id=%d, timeout=%d, refcnt=%d\n",
517
+						con->fd, con->id, con->timeout, con->refcnt);
506 518
 				if (nfds && FD_ISSET(con->fd, &sel_set)){
519
+					DBG("tcp receive: match, fd:isset\n");
507 520
 					nfds--;
508 521
 					resp=tcp_read_req(con);
509 522
 					if (resp<0){
510 523
 						FD_CLR(con->fd, &master_set);
524
+						DBG("tcp receive: FD_CLR %d, id=%d\n",
525
+								con->fd,	con->id);
511 526
 						tcpconn_listrm(list, con, c_next, c_prev);
512 527
 						release_tcpconn(con, resp, unix_sock);
513 528
 					}else{
... ...
@@ -522,6 +537,8 @@ void tcp_receive_loop(int unix_sock)
522 537
 								con, con->timeout, ticks);
523 538
 						resp=CONN_RELEASE;
524 539
 						FD_CLR(con->fd, &master_set);
540
+						DBG("tcp receive: FD_CLR %d, id=%d\n",
541
+								con->fd,	con->id);
525 542
 						tcpconn_listrm(list, con, c_next, c_prev);
526 543
 						release_tcpconn(con, resp, unix_sock);
527 544
 					}