Commit 9fe539d0 authored by Per Cederqvist's avatar Per Cederqvist

(checkstatus): Use sizeof(lbuf) instead of 80.

parent e0051fc7
/*
* $Id: updateLysKOM.c,v 1.13 1999/05/24 09:34:43 ceder Exp $
* $Id: updateLysKOM.c,v 1.14 2001/09/22 16:57:33 ceder Exp $
* Copyright (C) 1994-1995, 1998-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -118,10 +118,10 @@ checkstatus(FILE *fp,
else if (ldifftime(time(NULL), sbuf.st_mtime)
< 60 * param.downtime_mail_end)
{
/* The first line of the file should be a mail addres to send
/* The first line of the file should be a mail address to send
a reminder to. */
if (fgets(lbuf, 80, fp) == NULL)
if (fgets(lbuf, sizeof(lbuf), fp) == NULL)
{
fprintf(stderr,
"updateLysKOM: LysKOM has been down for a short while\n");
......@@ -129,6 +129,7 @@ checkstatus(FILE *fp,
}
if (strchr(lbuf, '\n'))
*strchr(lbuf, '\n') = '\0';
/* FIXME: "Reminder:" is taken to be an email address. */
sprintf(buf2, "echo 'Reminder: LysKOM is still not running.'|mail %s",
lbuf);
if (system(buf2) != 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