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

(garb_callback): Always run the garb, so that it cannot be completely

	starved.
parent fbd25009
/*
* $Id: text-garb.c,v 0.53 2003/08/23 16:38:13 ceder Exp $
* $Id: text-garb.c,v 0.54 2003/08/29 10:43:33 ceder Exp $
* Copyright (C) 1991-1995, 1997-2003 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -226,13 +226,26 @@ saved_by_comment(Text_stat *text_s)
default:
#endif
case unknown_info:
restart_kom("saved_by_recipient(): Illegal misc-item.\n");
restart_kom("saved_by_comment(): Illegal misc-item.\n");
}
}
return FALSE;
}
/* Examine ``text_no''. (``text_s'' is the text-stat of ``text_no'',
or NULL).
If ``text_no'' has a comment or footnote, return TRUE, else FALSE.
If ``text_no'' is a comment or footnote to ``parent'', the number
of seconds that has passed since it became so will be returned in
``comment_age''.
Set ``limit'' to the greatest keep-commented value found on any of
the recipients of ``text_no'', converted to seconds. (``parent''
is not involved in this computation.) */
static Bool
find_comment_limit_and_age(Text_no text_no,
Text_stat *text_s,
......@@ -357,7 +370,7 @@ saved_by_keep_commented(Text_no text_no,
default:
#endif
case unknown_info:
restart_kom("saved_by_recipient(): Illegal misc-item.\n");
restart_kom("saved_by_keep_commented(): Illegal misc-item.\n");
}
}
......@@ -452,17 +465,15 @@ garb_callback(oop_source *source,
void *UNUSED(user))
{
int rv = 0;
if (server_idle())
{
set_time();
if (garb_text() == FALSE)
set_time();
if (garb_text() == FALSE)
if (server_idle())
rv = setup_timer(&garb_timer, param.garbtimeout);
else
rv = setup_timer(&garb_timer, param.garb_interval);
}
rv = setup_timer(&garb_timer, param.garb_busy_postponement);
else
rv = setup_timer(&garb_timer, param.garb_busy_postponement);
rv = setup_timer(&garb_timer, param.garb_interval);
if (rv < 0)
kom_log("gettimeofday failed: %s\n", strerror(errno));
......
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