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

(async_i_am_off, async_broadcast): Removed.

(async_send_group_message): New function, derived from async_send_message.
(async_send_message): Now implemented in terms of async_send_group_message.
parent 8cd5a079
/*
* $Id: send-async.c,v 0.11 1994/04/05 08:04:37 ceder Exp $
* $Id: send-async.c,v 0.12 1994/12/31 11:59:28 ceder Exp $
* Copyright (C) 1991, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Written by Per Cederqvist 1990-07-22--23
*/
static char *rcsid = "$Id: send-async.c,v 0.11 1994/04/05 08:04:37 ceder Exp $";
static char *rcsid = "$Id: send-async.c,v 0.12 1994/12/31 11:59:28 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -104,40 +104,6 @@ async_i_am_on(Who_info info)
}
}
void
async_i_am_off(Pers_no pers_no)
{
Connection *cptr;
Session_no i = 0;
if (!param.send_async_messages)
return;
while ( (i = traverse_connections(i)) != 0 )
{
cptr = get_conn_by_number(i);
if ( cptr == NULL )
{
log("async_i_am_off(): cptr == NULL\n");
return;
}
switch(cptr->protocol)
{
case 0:
break;
case 'A':
prot_a_async_i_am_off(cptr, pers_no);
break;
default:
restart_kom("async_i_am_off(): bad protocol.\n");
break;
}
}
}
void
async_logout(Pers_no pers_no,
Session_no session_no)
......@@ -309,42 +275,6 @@ async_login(Pers_no pers_no,
}
}
void
async_broadcast(Pers_no pers_no,
String message)
{
Connection *cptr;
Session_no i = 0;
if (!param.send_async_messages)
return;
while ( (i = traverse_connections(i)) != 0)
{
cptr = get_conn_by_number(i);
if ( cptr == NULL )
{
log("async_broadcast(): cptr == NULL\n");
return;
}
switch(cptr->protocol)
{
case 0:
break;
case 'A':
prot_a_async_broadcast(cptr, pers_no, message);
break;
default:
restart_kom("async_broadcast(): bad protocol.\n");
break;
}
}
}
void
async_rejected_connection(void)
{
......@@ -387,6 +317,15 @@ Success
async_send_message(Pers_no recipient,
Pers_no sender,
String message)
{
return async_send_group_message(recipient, recipient, sender, message);
}
Success
async_send_group_message(Pers_no recipient,
Conf_no group_recipient,
Pers_no sender,
String message)
{
Connection *cptr;
Session_no i = 0;
......@@ -413,7 +352,8 @@ async_send_message(Pers_no recipient,
if ( recipient == 0 ||
(recipient == cptr->pers_no && recipient != 0 ))
{
prot_a_async_send_message(cptr, recipient, sender, message);
prot_a_async_send_message(cptr, group_recipient,
sender, message);
retval = OK;
}
break;
......
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