Commit 2b7fcc6f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(login_request): Don't handle the "% No connections left" situation.

(toploop): Handle ISC_EVENT_LOGIN_UNRELOCATED by returning a "% No
	connections left" message and closing the session, the way
	login_request used to do.
parent 282238dd
/*
* $Id: connections.c,v 0.55 1999/04/03 22:23:41 ceder Exp $
* $Id: connections.c,v 0.56 1999/04/17 15:15:54 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -36,7 +36,7 @@
#endif
static const char *
rcsid = "$Id: connections.c,v 0.55 1999/04/03 22:23:41 ceder Exp $";
rcsid = "$Id: connections.c,v 0.56 1999/04/17 15:15:54 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -758,17 +758,6 @@ login_request(IscEvent *event)
IscAddress *isc_adr;
char *hostname = NULL;
if (isc_sessions(kom_server_mcb) >= MAX_NO_OF_CONNECTIONS)
{
BUG(("Connection attempt rejected.\n"));
isc_printf(event->session, "%s", "%% No connections left.\n");
isc_flush(event->session);
isc_destroy(kom_server_mcb, event->session);
async_rejected_connection();
return;
}
/* Supress logins if /etc/nologin exists */
if (fexists("/etc/nologin"))
{
......@@ -986,6 +975,16 @@ toploop(void)
login_request(event);
break;
case ISC_EVENT_LOGIN_UNRELOCATED:
pending_input = TRUE;
BUG(("Connection attempt rejected.\n"));
isc_printf(event->session, "%s", "%% No connections left.\n");
isc_flush(event->session);
isc_destroy(kom_server_mcb, event->session);
async_rejected_connection();
break;
case ISC_EVENT_LOGOUT:
pending_input = TRUE;
logout_request(event);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment