/*
- * Copyright (C) 1997-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1997-2013 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
#include <regex.h>
#include <signal.h>
-#include <sys/time.h>
#include <sys/types.h>
#include <osl.h>
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
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?
return ret;
}
-int com_sender(struct command_context *cc)
+static int com_sender(struct command_context *cc)
{
int i, ret = 0;
char *msg = NULL;
}
/* server info */
-int com_si(struct command_context *cc)
+static int com_si(struct command_context *cc)
{
int i, ret;
char *msg, *ut, *sender_info = NULL;
mmd->num_commands,
mmd->num_connects,
conf.loglevel_arg,
- SERVER_AUDIO_FORMATS,
+ AUDIO_FORMAT_HANDLERS,
sender_info
);
mutex_unlock(mmd_mutex);
}
/* version */
-int com_version(struct command_context *cc)
+static int com_version(struct command_context *cc)
{
char *msg;
size_t len;
#undef EMPTY_STATUS_ITEMS
/* stat */
-int com_stat(struct command_context *cc)
+static int com_stat(struct command_context *cc)
{
int i, ret;
struct misc_meta_data tmp, *nmmd = &tmp;
}
/* help */
-int com_help(struct command_context *cc)
+static int com_help(struct command_context *cc)
{
struct server_command *cmd;
char *perms, *handler, *buf;
}
/* hup */
-int com_hup(struct command_context *cc)
+static int com_hup(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* term */
-int com_term(struct command_context *cc)
+static int com_term(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
return 1;
}
-int com_play(struct command_context *cc)
+static int com_play(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* stop */
-int com_stop(struct command_context *cc)
+static int com_stop(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* pause */
-int com_pause(struct command_context *cc)
+static int com_pause(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* next */
-int com_next(struct command_context *cc)
+static int com_next(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* nomore */
-int com_nomore(struct command_context *cc)
+static int com_nomore(struct command_context *cc)
{
if (cc->argc != 1)
return -E_COMMAND_SYNTAX;
}
/* ff */
-int com_ff(struct command_context *cc)
+static int com_ff(struct command_context *cc)
{
long promille;
int ret, backwards = 0;
}
/* jmp */
-int com_jmp(struct command_context *cc)
+static int com_jmp(struct command_context *cc)
{
long unsigned int i;
int ret;
/* 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;