Commit f09fd1e7 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(async_rejected_connection): Send this message at most once per

minute.
parent d80d526f
/*
* $Id: send-async.c,v 0.12 1994/12/31 11:59:28 ceder Exp $
* $Id: send-async.c,v 0.13 1995/11/02 20:43:07 ceder Exp $
* Copyright (C) 1991, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Written by Per Cederqvist 1990-07-22--23
*/
static char *rcsid = "$Id: send-async.c,v 0.12 1994/12/31 11:59:28 ceder Exp $";
static char *rcsid = "$Id: send-async.c,v 0.13 1995/11/02 20:43:07 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -51,7 +51,7 @@ USE(rcsid);
#include "lyskomd.h"
#include "log.h"
#include "param.h"
#include "ldifftime.h"
void
async_new_text(struct connection *cptr,
......@@ -280,10 +280,18 @@ async_rejected_connection(void)
{
Connection *cptr;
Session_no i = 0;
static time_t last_time = 0;
time_t curr_time;
if (!param.send_async_messages)
return;
time(&curr_time);
if (last_time != 0 && ldifftime(curr_time, last_time) < 60)
return;
last_time = curr_time;
while ( (i = traverse_connections(i)) != 0)
{
cptr = get_conn_by_number(i);
......
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