From 5b89d2b84eec8a59cfcdd44e709f78813de3002f Mon Sep 17 00:00:00 2001 From: phintuka Date: Fri, 14 Nov 2008 22:01:57 +0000 Subject: Added "Server busy" response when there are no free client slots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silenced compiler warnings warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result --- frontend_svr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend_svr.c b/frontend_svr.c index 578edc6a..4403a9c4 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.59 2008-11-14 21:59:35 phintuka Exp $ + * $Id: frontend_svr.c,v 1.60 2008-11-14 22:01:57 phintuka Exp $ * */ @@ -1689,14 +1689,15 @@ void cXinelibServer::Handle_ClientConnected(int fd) bool accepted = SVDRPhosts.Acceptable(sin.sin_addr.s_addr); if(!accepted) { LOGMSG("Address not allowed to connect (svdrphosts.conf)."); - write(fd, "Access denied.\r\n", 16); + (void)write(fd, "Access denied.\r\n", 16); CLOSESOCKET(fd); return; } if(cli>=MAXCLIENTS) { // too many clients - LOGMSG("Too mant clients, connection refused"); + LOGMSG("Too many clients, connection refused"); + (void)write(fd, "Server busy.\r\n", 16); CLOSESOCKET(fd); return; } -- cgit v1.2.3