=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tcpbench/tcpbench.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- src/usr.bin/tcpbench/tcpbench.c 2008/06/12 20:34:47 1.4 +++ src/usr.bin/tcpbench/tcpbench.c 2008/06/15 01:38:26 1.5 @@ -627,7 +627,7 @@ struct pollfd *pfd; ssize_t n; struct statctx sc; - u_int i; + u_int i, scnt = 0; const char *errstr; if ((buf = malloc(Bflag)) == NULL) @@ -650,7 +650,7 @@ for (sock = -1, ai = aitop; ai != NULL; ai = ai->ai_next) { saddr_ntop(ai->ai_addr, ai->ai_addrlen, tmp, sizeof(tmp)); - if (vflag) + if (vflag && scnt == 0) fprintf(stderr, "Trying %s\n", tmp); if ((sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) == -1) { @@ -688,8 +688,11 @@ pfd[i].fd = sock; pfd[i].events = POLLOUT; + scnt++; } + if (vflag && scnt > 1) + fprintf(stderr, "%u connections established\n", scnt); arc4random_buf(buf, Bflag); signal(SIGINT, exitsighand);