From 1a01e24e24c955add377cbead5fe04dcace41eeb Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 17 Jun 2009 01:31:19 +0000 Subject: * refine AYT report messages git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4646 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- daemon/logind/logind.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 2e0c1d70..ef7e43e0 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -579,10 +579,18 @@ _telnet_send_ayt_cb(void *ayt_arg, int fd) char buf[64]; assert(conn); - snprintf(buf, sizeof(buf), " fd:%u,ack:%u(-%u) \r\n", - g_opened_fd, - (unsigned int)g_ack_queue_size, - (unsigned int)g_ack_queue_reuse ); + if (!g_async_ack) + { + snprintf(buf, sizeof(buf), " (#%d)fd:%u \r\n", + g_retry_times, g_opened_fd); + } + else + { + snprintf(buf, sizeof(buf), " (#%d)fd:%u,ack:%u(-%u) \r\n", + g_retry_times, g_opened_fd, + (unsigned int)g_ack_queue_size, + (unsigned int)g_ack_queue_reuse ); + } _buff_write(conn, buf, strlen(buf)); } #endif -- cgit v1.2.3