diff options
author | phintuka <phintuka> | 2008-11-14 22:01:57 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-11-14 22:01:57 +0000 |
commit | 5b89d2b84eec8a59cfcdd44e709f78813de3002f (patch) | |
tree | 331052551a570eb121827c0fc90aed1a1dc5f3d3 | |
parent | e4eb62d9bcee6ea2e15857a48f1f28420cce652b (diff) | |
download | xineliboutput-5b89d2b84eec8a59cfcdd44e709f78813de3002f.tar.gz xineliboutput-5b89d2b84eec8a59cfcdd44e709f78813de3002f.tar.bz2 |
Added "Server busy" response when there are no free client slots
Silenced compiler warnings
warning: ignoring return value of âssize_t
write(int, const void*, size_t)â, declared with attribute warn_unused_result
-rw-r--r-- | frontend_svr.c | 7 |
1 files 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; } |