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

(cached_get_highest_local_no): Adjusted to the fact that the texts

	member is now a l2g.
(cache_sync): Fixed type in some printf format strings.
parent 880ac08d
/*
* $Id: dbck-cache.c,v 0.30 1998/07/08 16:21:43 ceder Exp $
* $Id: dbck-cache.c,v 0.31 1998/07/26 16:48:36 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -33,7 +33,7 @@
*/
static const char *
rcsid = "$Id: dbck-cache.c,v 0.30 1998/07/08 16:21:43 ceder Exp $";
rcsid = "$Id: dbck-cache.c,v 0.31 1998/07/26 16:48:36 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -77,6 +77,7 @@ USE(rcsid);
#include "ram-output.h"
#include "param.h"
#include "dbck-cache.h"
#include "local-to-global.h"
/*
* All functions that can fail sets kom_errno to a suitable value
......@@ -482,8 +483,7 @@ cached_get_garb_nice (Conf_no conf_no)
extern Local_text_no
cached_get_highest_local_no (Conf_no conf_no)
{
return ( conf_arr [ conf_no ]->texts.first_local_no
- 1 + conf_arr [ conf_no ]->texts.no_of_texts );
return l2g_first_appendable_key(&conf_arr[conf_no]->texts) - 1;
}
/* Lock a person struct in memory. Increase a referenc count. */
......@@ -631,7 +631,7 @@ cache_sync(void)
case 1:
if ( conf_arr[ i ] != NULL )
{
fprintf(fp, "C %d", i);
fprintf(fp, "C %lu", i);
foutput_conference(fp, conf_arr[ i ]);
putc('\n', fp);
}
......@@ -664,7 +664,7 @@ cache_sync(void)
case 1:
if ( pers_arr[ i ] != NULL )
{
fprintf(fp, "P %d", i);
fprintf(fp, "P %lu", i);
fprintf(fp, " %dH", PASSWD_LEN);
fwrite(pers_arr[i]->pwd, PASSWD_LEN, 1, fp);
foutput_person(fp, pers_arr[ i ]);
......@@ -714,7 +714,7 @@ cache_sync(void)
case 1:
if ( text_arr[ i ] != NULL )
{
fprintf(fp, "T %d", i);
fprintf(fp, "T %lu", i);
foutput_text_stat(fp, text_arr[ i ]);
putc('\n', fp);
}
......
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