[PATCH] blktrace: only print one connection info per client
authorJens Axboe <axboe@suse.de>
Wed, 15 Mar 2006 12:57:41 +0000 (13:57 +0100)
committerJens Axboe <axboe@suse.de>
Wed, 15 Mar 2006 12:57:41 +0000 (13:57 +0100)
blktrace.c

index c8ec9ab03a649650a5b74b4643672e1fcc9127c5..4b34e9c73fdbdf7e6ad34f5e5f159106acb6fb27 100644 (file)
@@ -1550,13 +1550,14 @@ static void net_add_connection(int listen_fd, struct sockaddr_in *addr)
                memset(ch, 0, sizeof(*ch));
                ch->cl_in_addr = addr->sin_addr;
                net_add_client_host(ch);
+
+               printf("server: connection from %s\n", inet_ntoa(addr->sin_addr));
        }
 
        ch->net_connections = realloc(ch->net_connections, (ch->nconn + 1) * sizeof(*nc));
        nc = &ch->net_connections[ch->nconn++];
        memset(nc, 0, sizeof(*nc));
 
-       printf("server: connection from %s\n", inet_ntoa(addr->sin_addr));
        time(&nc->connect_time);
        nc->ch = ch;
        nc->in_fd = in_fd;