Commit 7612e913 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(motd_of_lyskom): Now a Text_no, not int.

(main): Use atol, not atoi, when setting motd_of_lyskom.
parent beaf7aeb
/* /*
* $Id: dbck.c,v 0.67 2002/08/10 16:56:14 ceder Exp $ * $Id: dbck.c,v 0.68 2002/09/06 22:42:42 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association. * Copyright (C) 1991-2002 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -136,7 +136,7 @@ static long force_output=0; /* Force sync (for conversions) */ ...@@ -136,7 +136,7 @@ static long force_output=0; /* Force sync (for conversions) */
int pers_pres_conf = -1; int pers_pres_conf = -1;
int conf_pres_conf = -1; int conf_pres_conf = -1;
int motd_conf = -1; int motd_conf = -1;
int motd_of_lyskom = -1; Text_no motd_of_lyskom = (Text_no)-1;
int kom_news_conf = -1; int kom_news_conf = -1;
...@@ -1472,7 +1472,7 @@ main (int argc, ...@@ -1472,7 +1472,7 @@ main (int argc,
break; break;
case OPT_MOTD_OF_KOM: case OPT_MOTD_OF_KOM:
motd_of_lyskom = atoi(optarg); motd_of_lyskom = atol(optarg);
if (motd_of_lyskom == 0 && *optarg != '0') if (motd_of_lyskom == 0 && *optarg != '0')
restart_kom("%s: bad text number %s\n", argv[0], optarg); restart_kom("%s: bad text number %s\n", argv[0], optarg);
need_rw = 1; need_rw = 1;
...@@ -1606,7 +1606,7 @@ main (int argc, ...@@ -1606,7 +1606,7 @@ main (int argc,
kom_info.kom_news_conf = kom_news_conf; kom_info.kom_news_conf = kom_news_conf;
modifications++; modifications++;
} }
if (motd_of_lyskom != -1) if (motd_of_lyskom != (Text_no)-1)
{ {
kom_info.motd_of_lyskom = motd_of_lyskom; kom_info.motd_of_lyskom = motd_of_lyskom;
modifications++; modifications++;
......
Supports Markdown
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