From 69ed27440290292a36d6885c57c02886e94830f4 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 12 Jan 2009 21:47:52 +0000 Subject: [PATCH] * Properly handle '551 too many users' error in WebCit. This resolves bug 420. --- webcit/webcit.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/webcit/webcit.c b/webcit/webcit.c index 2be182799..6cecbe7d6 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -804,9 +804,17 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method } else { WCC->connected = 1; - serv_getln(buf, sizeof buf); /** get the server welcome message */ + serv_getln(buf, sizeof buf); /* get the server greeting */ - /** + /* Are there too many users already logged in? */ + if (!strncmp(buf, "571", 3)) { + wprintf(_("This server is already serving its maximum number of users and cannot accept any additional logins at this time. Please try again later or contact your system administrator.")); + end_burst(); + end_webcit_session(); + goto SKIP_ALL_THIS_CRAP; + } + + /* * From what host is our user connecting? Go with * the host at the other end of the HTTP socket, * unless we are following X-Forwarded-For: headers -- 2.39.2