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);
}
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;
}