From 36fa0940d5c97457f7093d81e7d298c88dac14af Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 17 Jan 2015 14:28:00 -0200 Subject: Stat server submission logic update to ensure report is submit in full. Signed-off-by: shennetsind --- src/char/char.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/char/char.c b/src/char/char.c index 1b8d466f9..1d9d1d65c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -45,6 +45,10 @@ #include "../common/timer.h" #include "../common/utils.h" +#ifndef WIN32 + #include +#endif + // private declarations #define CHAR_CONF_NAME "conf/char-server.conf" #define LAN_CONF_NAME "conf/subnet.conf" @@ -3746,7 +3750,14 @@ void char_parse_frommap_request_stats_report(int fd) WFIFOSET(sfd, RFIFOW(fd,2) ); - flush_fifo(sfd); + do { + flush_fifo(sfd); +#ifdef WIN32 + Sleep(1); +#else + sleep(1); +#endif + } while( !session[sfd]->flag.eof && session[sfd]->wdata_size ); do_close(sfd); -- cgit v1.2.3-60-g2f50