From: Andre Date: Fri, 24 Mar 2006 20:41:36 +0000 (+0100) Subject: log the IP address of the connecting client. X-Git-Tag: v0.2.12~144 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=96ba5d16111ffb0e4814f1e786cbd53ce3121bd2;p=paraslash.git log the IP address of the connecting client. --- diff --git a/dccp_send.c b/dccp_send.c index c7805f73..57e2a70c 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -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; }