Commit 17fc66e0 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(async_text_read): New function.

(async_invalidate_text_read): New function.
parent 4bd0cb6c
/*
* $Id: send-async.c,v 0.50 2003/08/23 16:38:14 ceder Exp $
* $Id: send-async.c,v 0.51 2004/07/18 20:44:51 ceder Exp $
* Copyright (C) 1991, 1993-2003 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -655,6 +655,83 @@ async_text_aux_changed(Connection *cptr,
}
}
void
async_text_read(Connection *originating_connection,
Conf_no conf_no,
Local_text_no local_no)
{
Connection *cptr;
Session_no i = 0;
if (!param.send_async_messages)
return;
while ((i = traverse_connections(i)) != 0)
{
/* Never send this to the originating client. */
if (i == originating_connection->session_no)
continue;
cptr = get_conn_by_number(i);
switch(cptr->protocol)
{
case 0:
/* No protocol specified yet */
break;
case 'A':
/* Check that connection is logged on as the proper person. */
if (handshake_ok(cptr, 0)
&& originating_connection->pers_no == cptr->pers_no)
{
prot_a_async_text_read(cptr, conf_no, local_no);
}
break;
default:
restart_kom("async_text_read(): bad protocol.\n");
break;
}
}
}
void
async_invalidate_text_read(Connection *originating_connection,
Conf_no conf_no)
{
Connection *cptr;
Session_no i = 0;
if (!param.send_async_messages)
return;
while ((i = traverse_connections(i)) != 0)
{
/* Never send this to the originating client. */
if (i == originating_connection->session_no)
continue;
cptr = get_conn_by_number(i);
switch(cptr->protocol)
{
case 0:
/* No protocol specified yet */
break;
case 'A':
/* Check that connection is logged on as the proper person. */
if (handshake_ok(cptr, 0)
&& originating_connection->pers_no == cptr->pers_no)
{
prot_a_async_invalidate_text_read(cptr, conf_no);
}
break;
default:
restart_kom("async_invalidate_text_read(): bad protocol.\n");
break;
}
}
}
#ifdef DEBUG_CALLS
void
......
/*
* $Id: send-async.h,v 0.24 2003/08/23 16:38:13 ceder Exp $
* $Id: send-async.h,v 0.25 2004/07/18 20:44:51 ceder Exp $
* Copyright (C) 1991, 1994-1999, 2001-2003 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -23,7 +23,7 @@
* Please report bugs at http://bugzilla.lysator.liu.se/.
*/
/*
* $Id: send-async.h,v 0.24 2003/08/23 16:38:13 ceder Exp $
* $Id: send-async.h,v 0.25 2004/07/18 20:44:51 ceder Exp $
*
*/
extern void
......@@ -123,6 +123,15 @@ async_text_aux_changed(Connection *cptr,
unsigned long highest_old_aux);
void
async_text_read(Connection *originating_connection,
Conf_no conf_no,
Local_text_no local_no);
void
async_invalidate_text_read(Connection *originating_connection,
Conf_no conf_no);
#ifdef DEBUG_CALLS
void
async_garb_ended(int no_deleted);
......
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