]> git.tue.mpg.de Git - paraslash.git/commitdiff
log the IP address of the connecting client.
authorAndre <maan@p133.(none)>
Fri, 24 Mar 2006 20:41:36 +0000 (21:41 +0100)
committerAndre <maan@p133.(none)>
Fri, 24 Mar 2006 20:41:36 +0000 (21:41 +0100)
dccp_send.c

index c7805f735b02c096083058d269ee4b0d2ee6b759..57e2a70ccb30b0cef8550fd288991ef005d30b1e 100644 (file)
@@ -64,14 +64,13 @@ static void dccp_post_select(__unused struct audio_format *af, fd_set *rfds,
 
        if (!FD_ISSET(listen_fd, rfds))
                return;
-       PARA_NOTICE_LOG("%s", "accepting...\n");
        dc = para_calloc(sizeof(struct dccp_client));
        ret = para_accept(listen_fd, &dc->addr, sizeof(struct sockaddr_in));
        if (ret < 0) {
                PARA_ERROR_LOG("%s", PARA_STRERROR(-ret));
                return;
        }
-       PARA_NOTICE_LOG("%s", "connection\n");
+       PARA_NOTICE_LOG("connection from %s\n", inet_ntoa(dc->addr.sin_addr));
        dc->fd = ret;
        list_add(&dc->node, &clients);
 }
@@ -174,7 +173,7 @@ static char *dccp_info(void)
        free(buf);
        list_for_each_entry_safe(dc, tmp, &clients, node)
                num_clients++;
-       buf = make_message("%d connected clients\n", num_clients);
+       buf = make_message("dccp connected clients: %d\n", num_clients);
        return buf;
 }