Commit 1c565136 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(local_to_global_reverse): New function.

parent 21ae820e
/*
* $Id: text.c,v 0.115 2003/08/20 10:24:59 ceder Exp $
* $Id: text.c,v 0.116 2003/08/22 06:44:45 ceder Exp $
* Copyright (C) 1991-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -3043,6 +3043,57 @@ local_to_global(Conf_no conf_no,
return OK;
}
extern Success
local_to_global_reverse(Conf_no conf_no,
Local_text_no local_no_ceiling,
unsigned long no_of_texts,
Text_mapping_reverse *result)
{
Conference * conf_c;
enum access acc;
Local_text_no ceiling;
CHK_CONNECTION(FAILURE);
if (no_of_texts > 255)
{
err_stat = 255;
kom_errno = KOM_LONG_ARRAY;
return FAILURE;
}
CHK_LOGIN(FAILURE);
GET_C_STAT(conf_c, conf_no, FAILURE);
acc = access_perm(conf_no, active_connection, limited);
if (acc <= none)
{
err_stat = conf_no;
kom_errno = KOM_UNDEF_CONF;
return FAILURE;
}
if (acc == read_protected)
{
err_stat = conf_no;
kom_errno = KOM_ACCESS;
return FAILURE;
}
ceiling = l2g_first_appendable_key(&conf_c->texts);
if (local_no_ceiling == 0 || local_no_ceiling > ceiling)
result->ceiling = ceiling;
else
result->ceiling = local_no_ceiling;
result->no_of_texts = no_of_texts;
result->l2g = &conf_c->texts;
return OK;
}
static void
send_async_text_aux_changed(Text_no text_no,
......
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