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

(cached_get_conf_supervisor): New function.

(mark_conference_as_changed): Copy the supervisor to the entry in
	small_conf_arr.
(init_small_conf): Set supervisor.
(setup_small_conf): Set supervisor.
parent bc55bafa
/*
* $Id: simple-cache.c,v 0.83 1999/07/02 00:14:04 byers Exp $
* $Id: simple-cache.c,v 0.84 1999/07/05 06:57:06 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -40,7 +40,7 @@
#endif
static const char *
rcsid = "$Id: simple-cache.c,v 0.83 1999/07/02 00:14:04 byers Exp $";
rcsid = "$Id: simple-cache.c,v 0.84 1999/07/05 06:57:06 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -380,7 +380,7 @@ cached_change_name( Conf_no name_num,
String new_name )
{
if ( name_num < 1 || name_num >= next_free_num )
restart_kom("cached_change_name(%d, ----): next_free_num==%d",
restart_kom("cached_change_name(%d, ----): next_free_num==%d\n",
name_num, next_free_num);
s_clear( &small_conf_arr[name_num]->name );
......@@ -405,6 +405,22 @@ cached_get_conf_type (Conf_no conf_no)
return small_conf_arr [ conf_no ]->type;
}
extern Conf_no
cached_get_conf_supervisor(Conf_no conf_no)
{
if (conf_no < 1 || conf_no >= next_free_num)
restart_kom("cached_get_conf_supervisor(%d): next_free_num==%d\n",
conf_no, next_free_num);
if (small_conf_arr[conf_no] == NULL)
restart_kom("cached_get_conf_supervisor(%d):"
" conference does not exist.\n", conf_no);
LOGACC(lt_get_conf_supervisor, conf_no);
return small_conf_arr[conf_no]->supervisor;
}
/*
* Return number of conferences present. (Actually, return a number
* at least as large as the number of conferences present).
......@@ -467,11 +483,12 @@ mark_conference_as_changed(Conf_no conf_no)
conf_c = (Conference *) node->ptr;
small_conf_arr[ conf_no ]->highest_local_no
small_conf_arr[conf_no]->highest_local_no
= l2g_first_appendable_key(&conf_c->texts) - 1;
small_conf_arr[ conf_no ]->nice = conf_c->nice;
small_conf_arr[ conf_no ]->type = conf_c->type;
small_conf_arr[conf_no]->nice = conf_c->nice;
small_conf_arr[conf_no]->type = conf_c->type;
small_conf_arr[conf_no]->supervisor = conf_c->supervisor;
}
void
......@@ -614,6 +631,7 @@ init_small_conf(Small_conf *sc)
{
sc->name = EMPTY_STRING;
init_conf_type(&sc->type);
sc->supervisor = 0;
sc->highest_local_no = 0;
sc->nice = param.default_nice;
}
......@@ -2349,12 +2367,13 @@ static void
setup_small_conf(Conf_no conf_no,
Conference *conf_c)
{
small_conf_arr[ conf_no ] = alloc_small_conf();
s_strcpy(&small_conf_arr[ conf_no ]->name, conf_c->name);
small_conf_arr[ conf_no ]->type = conf_c->type;
small_conf_arr[ conf_no ]->highest_local_no
small_conf_arr[conf_no] = alloc_small_conf();
s_strcpy(&small_conf_arr[conf_no]->name, conf_c->name);
small_conf_arr[conf_no]->type = conf_c->type;
small_conf_arr[conf_no]->supervisor = conf_c->supervisor;
small_conf_arr[conf_no]->highest_local_no
= l2g_first_appendable_key(&conf_c->texts) - 1;
small_conf_arr[ conf_no ]->nice = conf_c->nice;
small_conf_arr[conf_no]->nice = conf_c->nice;
}
......
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