commit 81ef230c1aa23969d15e29bf8b08c74660f17fee
parent 1717fb2cc1e8a41154bc2a337f60d6ed8986ba6a
Author: dsp <dsp@2f30.org>
Date: Tue, 3 Jul 2012 16:31:15 +0300
removed default dot printing, fixed select linux bug (timeout reset must be in loop)
Diffstat:
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/nbeng.c b/nbeng.c
@@ -374,10 +374,10 @@ main(int argc, char *argv[])
prepare_socket(con, host, port, 1);
- timeout.tv_sec = 1;
- timeout.tv_usec = 0;
/* file descriptors for reading are stdin and confd */
while (1) {
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
FD_ZERO(&(con->lset));
FD_SET(con->wfd, &(con->lset));
highsock = con->wfd;
@@ -397,11 +397,8 @@ main(int argc, char *argv[])
warn("select");
goto freex;
}
- if (readsocks == 0) {
- /* show that we are alive */
- printf(".");
- fflush(stdout);
- } else {
+ /* change this to == 0 and put default printout if necessary */
+ if (readsocks != 0) {
if (FD_ISSET(con->wfd, &(con->lset))) {
if (con->clifd == -1
&& con->contype != UDPCON) {