Commit 8e55af67 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(async_rejected_connection): Use struct timeval instead of time_t.

parent f447d817
/*
* $Id: send-async.c,v 0.41 2003/01/06 13:10:05 ceder Exp $
* $Id: send-async.c,v 0.42 2003/07/12 21:29:43 ceder Exp $
* Copyright (C) 1991, 1993-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -55,6 +55,7 @@
#include "kom-errno.h"
#include "manipulate.h"
#include "server-time.h"
#include "timeval-util.h"
void
async_new_text_old(struct connection *cptr,
......@@ -323,13 +324,16 @@ async_rejected_connection(void)
{
Connection *cptr;
Session_no i = 0;
static time_t last_time = 0;
static struct timeval last_time = {0, 0};
if (!param.send_async_messages)
return;
if (last_time != 0 && ldifftime(current_time, last_time) < 60)
return;
if (timeval_nonzero(last_time)
&& timeval_diff_sec(current_time, last_time) < 60)
{
return;
}
last_time = current_time;
......
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