X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=send_common.c;h=ec7ab67108334c85085b46b84ada1db45eb91a82;hp=354c9ed509deddc14f4528ce318e0d1ad90a8b7e;hb=ee3dfa7ab8a74124448649386e877775cd8625b6;hpb=0703f75a276020f9645f987134d49402f7c019c0 diff --git a/send_common.c b/send_common.c index 354c9ed5..ec7ab671 100644 --- a/send_common.c +++ b/send_common.c @@ -1,13 +1,18 @@ /* - * Copyright (C) 2005-2012 Andre Noll + * Copyright (C) 2005 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \file send_common.c Functions used by more than one paraslash sender. */ +#include +#include #include #include +#include +#include +#include #include "para.h" #include "error.h" @@ -154,7 +159,7 @@ void init_sender_status(struct sender_status *ss, char **access_arg, * * \return The string printed in the "si" command. */ -char *get_sender_info(struct sender_status *ss, const char *name) +char *generic_sender_status(struct sender_status *ss, const char *name) { char *clnts = NULL, *ret; struct sender_client *sc, *tmp_sc; @@ -166,14 +171,12 @@ char *get_sender_info(struct sender_status *ss, const char *name) clnts = tmp; } ret = make_message( - "%s sender:\n" - "\tstatus: %s\n" - "\tport: %s\n" - "\tnumber of connected clients: %d\n" - "\tmaximal number of clients: %d%s\n" - "\tconnected clients: %s\n" - "\taccess %s list: %s\n", - name, + "status: %s\n" + "port: %s\n" + "number of connected clients: %d\n" + "maximal number of clients: %d%s\n" + "connected clients: %s\n" + "access %s list: %s\n", (ss->listen_fd >= 0)? "on" : "off", stringify_port(ss->port, strcmp(name, "http") ? "dccp" : "tcp"), ss->num_clients,