]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
Remove some duplicate semicolons.
[paraslash.git] / command.c
index b67966fa0653cae2641a37823fcf81c2410b63ce..79ca3652040188010dbbf2209fbf8ffe5757db50 100644 (file)
--- a/command.c
+++ b/command.c
@@ -1,5 +1,5 @@
 /*
- * 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.
  */
@@ -8,7 +8,6 @@
 
 #include <regex.h>
 #include <signal.h>
-#include <sys/time.h>
 #include <sys/types.h>
 #include <osl.h>
 
@@ -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(&current_time, NULL);
+       clock_get_realtime(&current_time);
        /*
         * The calls to WRITE_STATUS_ITEM() below never fail because
         * b->max_size is zero (unlimited), see para_printf(). However, clang
@@ -396,7 +395,8 @@ static int com_si(struct command_context *cc)
                free(info);
        }
        ut = get_server_uptime_str(now);
-       ret = xasprintf(&msg, "version: " GIT_VERSION "\n"
+       ret = xasprintf(&msg,
+               "version: %s\n"
                "up: %s\nplayed: %u\n"
                "server_pid: %d\n"
                "afs_pid: %d\n"
@@ -404,6 +404,7 @@ static int com_si(struct command_context *cc)
                "current loglevel: %s\n"
                "supported audio formats: %s\n"
                "%s",
+               version_git(),
                ut, mmd->num_played,
                (int)getppid(),
                (int)mmd->afs_pid,
@@ -411,7 +412,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);
@@ -432,11 +433,9 @@ static int com_version(struct command_context *cc)
 
        if (cc->argc != 1)
                return -E_COMMAND_SYNTAX;
-       msg = VERSION_TEXT("server") "built: " BUILD_DATE "\n" UNAME_RS
-               ", " CC_VERSION "\n";
-       len = strlen(msg);
+       len = xasprintf(&msg, "%s", version_text("server"));
        if (cc->use_sideband)
-               return send_sb(&cc->scc, msg, len, SBD_OUTPUT, true);
+               return send_sb(&cc->scc, msg, len, SBD_OUTPUT, false);
        return sc_send_bin_buffer(&cc->scc, msg, len);
 }