Commit 294d7e3c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(garb_callback): Check return value of setup_timer.

parent fa7155a6
/*
* $Id: text-garb.c,v 0.48 2003/07/28 08:00:33 ceder Exp $
* $Id: text-garb.c,v 0.49 2003/07/31 23:02:38 ceder Exp $
* Copyright (C) 1991-1995, 1997-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -37,11 +37,14 @@
#include "timewrap.h"
#include <sys/types.h>
#include <setjmp.h>
#include <errno.h>
#include <string.h>
#include "oop.h"
#include "ldifftime.h"
#include "s-string.h"
#include "timeval-util.h"
#include "kom-types.h"
#include "text-garb.h"
#include "kom-errno.h"
......@@ -231,16 +234,21 @@ garb_callback(oop_source *source,
struct timeval UNUSED(tv),
void *UNUSED(user))
{
int rv = 0;
if (server_idle())
{
set_time();
if (garb_text() == FALSE)
setup_timer(&garb_timer, param.garbtimeout);
rv = setup_timer(&garb_timer, param.garbtimeout);
else
setup_timer(&garb_timer, param.garb_interval);
rv = setup_timer(&garb_timer, param.garb_interval);
}
else
setup_timer(&garb_timer, param.garb_busy_postponement);
rv = setup_timer(&garb_timer, param.garb_busy_postponement);
if (rv < 0)
kom_log("gettimeofday failed: %s\n", strerror(errno));
source->on_time(source, garb_timer, garb_callback, NULL);
return OOP_CONTINUE;
......
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