Commit 573cc962 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(async_rejected_connection): Use current_time instead of calling time().

parent 4825f0a9
/*
* $Id: send-async.c,v 0.26 1999/05/12 13:25:30 byers Exp $
* $Id: send-async.c,v 0.27 1999/05/16 21:46:41 ceder Exp $
* Copyright (C) 1991, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -34,7 +34,7 @@
#endif
static const char *
rcsid = "$Id: send-async.c,v 0.26 1999/05/12 13:25:30 byers Exp $";
rcsid = "$Id: send-async.c,v 0.27 1999/05/16 21:46:41 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -62,6 +62,7 @@ USE(rcsid);
#include "ldifftime.h"
#include "manipulate.h"
#include "kom-errno.h"
#include "server-time.h"
void
async_new_text_old(struct connection *cptr,
......@@ -328,16 +329,14 @@ 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)
if (last_time != 0 && ldifftime(current_time, last_time) < 60)
return;
last_time = curr_time;
last_time = current_time;
while ( (i = traverse_connections(i)) != 0)
{
......
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