=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/plugin/mytcpio.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- OpenXM/src/kan96xx/plugin/mytcpio.c 2004/02/25 23:14:35 1.13 +++ OpenXM/src/kan96xx/plugin/mytcpio.c 2004/02/28 13:39:42 1.14 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/plugin/mytcpio.c,v 1.12 2003/09/16 02:57:39 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/plugin/mytcpio.c,v 1.13 2004/02/25 23:14:35 takayama Exp $ */ #include #include #include @@ -42,7 +42,7 @@ socketOpen(char *serverName,int portNumber) { int tt; SET_TCPIOERROR; - fprintf(TcpioError,"Hello from open. serverName is %s and portnumber is %d\n", + if (!Quiet) fprintf(TcpioError,"Hello from open. serverName is %s and portnumber is %d\n", serverName,portNumber); if ((myhost = gethostbyname(serverName)) == NULL) { errorMsg1s("Bad server name."); @@ -78,7 +78,7 @@ socketOpen(char *serverName,int portNumber) { errorMsg1s("Listen failed"); return(-1); } - fprintf(TcpioError,"Done the initialization. port =%d\n",ntohs(me.sin_port)); + if (!Quiet) fprintf(TcpioError,"Done the initialization. port =%d\n",ntohs(me.sin_port)); OpenedSocket = ntohs(me.sin_port); return(s_waiting); } @@ -89,7 +89,7 @@ socketAccept(int snum) { SET_TCPIOERROR; s = snum; - fprintf(TcpioError,"Trying to accept... "); fflush(TcpioError); + if (!Quiet) fprintf(TcpioError,"Trying to accept... "); fflush(TcpioError); if ((news = accept(s,NULL,NULL)) < 0) { errorMsg1s("Error in accept. Retrying (socketAccept)."); /* Code added for strange behavior on cygwin. */ @@ -98,7 +98,7 @@ socketAccept(int snum) { return (-1); } } - fprintf(TcpioError,"Accepted.\n"); fflush(TcpioError); + if (!Quiet) fprintf(TcpioError,"Accepted.\n"); fflush(TcpioError); if (close(s) < 0) { errorMsg1s("Error in closing the old socket."); return(-1); @@ -114,7 +114,7 @@ socketAcceptLocal(int snum) { SET_TCPIOERROR; s = snum; - fprintf(TcpioError,"Trying to accept from localhost... "); fflush(TcpioError); + if (!Quiet) fprintf(TcpioError,"Trying to accept from localhost... "); fflush(TcpioError); len = sizeof(struct sockaddr); if ((news = accept(s,&peer,&len)) < 0) { errorMsg1s("Error in accept. Retrying"); @@ -127,14 +127,14 @@ socketAcceptLocal(int snum) { len = sizeof(struct sockaddr); getpeername(news,&peer,&len); - printf("len= %d\n",len); + if (!Quiet) printf("len= %d\n",len); for (i=0; i