X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=ec822c82978d78649b6641d2206f41db44ab3bd7;hp=f9bace34146e28ccaf7b0632e0fa34ede51de8aa;hb=24758c5f;hpb=2ce04a49091712719b8fd60a6c7888258b719db1 diff --git a/command.c b/command.c index f9bace34..ec822c82 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2012 Andre Noll + * Copyright (C) 1997-2013 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -124,7 +123,7 @@ static unsigned get_status(struct misc_meta_data *nmmd, int parser_friendly, localtime_r(&nmmd->mtime, &mtime_tm); strftime(mtime, 29, "%b %d %Y", &mtime_tm); } - gettimeofday(¤t_time, NULL); + clock_get_realtime(¤t_time); /* * The calls to WRITE_STATUS_ITEM() below never fail because * b->max_size is zero (unlimited), see para_printf(). However, clang @@ -259,6 +258,14 @@ __printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band, return send_sb(scc, msg, ret, band, false); } +/** + * Send an error message to a client. + * + * \param cc Client info. + * \param err The (positive) error code. + * + * \return The return value of the underlying call to send_sb_va(). + */ int send_strerror(struct command_context *cc, int err) { return cc->use_sideband? @@ -403,7 +410,7 @@ static int com_si(struct command_context *cc) mmd->num_commands, mmd->num_connects, conf.loglevel_arg, - SERVER_AUDIO_FORMATS, + AUDIO_FORMAT_HANDLERS, sender_info ); mutex_unlock(mmd_mutex); @@ -984,7 +991,7 @@ __noreturn void handle_connect(int fd, const char *peername) /* send Welcome message */ ret = write_va_buffer(fd, "This is para_server, version " PACKAGE_VERSION ".\n" - "Features: sideband,foo\n" + "Features: sideband\n" ); if (ret < 0) goto net_err;