From: Art Cancro Date: Mon, 12 Jan 2009 21:47:52 +0000 (+0000) Subject: * Properly handle '551 too many users' error in WebCit. This resolves bug 420. X-Git-Tag: v7.86~1618 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=69ed27440290292a36d6885c57c02886e94830f4;p=citadel.git * Properly handle '551 too many users' error in WebCit. This resolves bug 420. --- 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