Commit 23a9f9bf authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(prot_a_output_static_session_info): New function.

(prot_a_output_dynamic_session_info): New function.
(prot_a_output_dynamic_session_info_list): New function.
parent af654b6b
/*
* $Id: prot-a-output.c,v 0.22 1996/07/28 23:39:30 ceder Exp $
* $Id: prot-a-output.c,v 0.23 1996/08/02 00:05:30 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Written by ceder 1990-07-13
*/
static char *rcsid = "$Id: prot-a-output.c,v 0.22 1996/07/28 23:39:30 ceder Exp $";
static char *rcsid = "$Id: prot-a-output.c,v 0.23 1996/08/02 00:05:30 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -677,3 +677,47 @@ prot_a_output_num_list (Connection *fp,
mux_printf(fp, " }");
}
}
static void
prot_a_output_dynamic_session_info (Connection *fp,
Dynamic_session_info *info)
{
mux_printf(fp, " %lu %lu %lu %lu %lu",
(unsigned long)info->session,
(unsigned long)info->person,
(unsigned long)info->working_conference,
(unsigned long)info->idle_time,
(unsigned long)info->invisible);
prot_a_output_string(fp, info->what_am_i_doing);
}
void
prot_a_output_static_session_info (Connection *fp,
Static_session_info *info)
{
prot_a_output_string(fp, info->username);
prot_a_output_string(fp, info->hostname);
prot_a_output_string(fp, info->ident_user);
prot_a_output_time(fp, info->connection_time);
}
void
prot_a_output_dynamic_session_info_list (Connection *fp,
Dynamic_session_info_list *list)
{
long i;
mux_printf(fp, " %lu", (unsigned long) list->no_of_sessions);
if (list->no_of_sessions == 0)
mux_printf(fp, " *");
else
{
mux_printf(fp, " {");
for (i = 0; i < list->no_of_sessions; i++)
prot_a_output_dynamic_session_info(fp, &list->sessions[i]);
mux_printf(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