- fixed process_count() (forgot to add some() when I added tcp_disable)
authorAndrei Pelinescu-Onciul <andrei@iptel.org>
Fri, 18 Apr 2003 13:58:15 +0000 (13:58 +0000)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Fri, 18 Apr 2003 13:58:15 +0000 (13:58 +0000)
Makefile.defs
main.c
pt.h

index 0313929..0d3150c 100644 (file)
@@ -25,7 +25,7 @@
 VERSION = 0
 PATCHLEVEL = 8
 SUBLEVEL =   11
-EXTRAVERSION = pre20
+EXTRAVERSION = pre21
 
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
diff --git a/main.c b/main.c
index b25b7b2..4cc42ae 100644 (file)
--- a/main.c
+++ b/main.c
@@ -877,11 +877,11 @@ int main_loop()
 #endif
        /*DEBUG- remove it*/
 #ifdef DEBUG
-       printf("\n% 3d processes, % 3d children * % 3d listening addresses + main"
-                       " + fifo %s\n", process_no+1, children_no, sock_no,
+       fprintf(stderr, "\n% 3d processes (%3d), % 3d children * % 3d listening addresses"
+                       "+ main + fifo %s\n", process_no+1, process_count(), children_no, sock_no,
                        (timer_list)?"+ timer":"");
        for (r=0; r<=process_no; r++){
-               printf("% 3d   % 5d\n", r, pt[r].pid);
+               fprintf(stderr, "% 3d   % 5d - %s\n", r, pt[r].pid, pt[r].desc);
        }
 #endif
        process_no=0; 
diff --git a/pt.h b/pt.h
index 1557354..512c5c0 100644 (file)
--- a/pt.h
+++ b/pt.h
@@ -71,8 +71,8 @@ inline static int process_count()
                /* fifo server */
                +((fifo==NULL || strlen(fifo)==0) ? 0 : 1 )
 #ifdef USE_TCP
-               + (!tcp_disable)?( 1/* tcp main */ + tcp_children_no + 
-                                                       (timer_list ? 0: 1)):0 /* add the timer proc.
+               +((!tcp_disable)?( 1/* tcp main */ + tcp_children_no + 
+                                                       (timer_list ? 0: 1)):0) /* add the timer proc.
                                                                                                          if not already taken
                                                                                                          into account */
 #endif