diff options
author | Kalle Wallin <kaw@linux.se> | 2004-06-15 13:17:22 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-06-15 13:17:22 +0000 |
commit | ddd7adff6d0e02c31b371559cd822f3b5feba345 (patch) | |
tree | f7c0703e7ee740ce2454cdff6f0249c8d862decd /src/main.c | |
parent | a8baf3be0cbdb33d48df4e704ca2f1cb0b77f93b (diff) | |
download | mpd-ddd7adff6d0e02c31b371559cd822f3b5feba345.tar.gz mpd-ddd7adff6d0e02c31b371559cd822f3b5feba345.tar.xz mpd-ddd7adff6d0e02c31b371559cd822f3b5feba345.zip |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1497 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/main.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index e996233a0..81522f9d7 100644 --- a/src/main.c +++ b/src/main.c @@ -57,7 +57,7 @@ error_callback(mpdclient_t *c, gint error, gchar *msg) gint code = GET_ACK_ERROR_CODE(error); error = error & 0xFF; - D("Error [%d:%d]> \"%s\"\n", error, c->connection->errorCode, msg); + D("Error [%d:%d]> \"%s\"\n", error, code, msg); switch(error) { case MPD_ERROR_CONNPORT: @@ -69,8 +69,8 @@ error_callback(mpdclient_t *c, gint error, gchar *msg) break; default: screen_status_printf("%s", msg); - doupdate(); beep(); + doupdate(); connected = FALSE; } } @@ -87,6 +87,8 @@ exit_and_cleanup(void) } g_free(options.host); g_free(options.password); + g_free(options.list_format); + g_free(options.status_format); if( timer ) g_timer_destroy(timer); } @@ -184,6 +186,15 @@ main(int argc, const char *argv[]) mpd->connection->version[1], mpd->connection->version[2]); + if( !MPD_VERSION(mpd, 0,11,0) ) + { + fprintf(stderr, "MPD version %d.%d.%d is to old (0.11.0 needed).\n", + mpd->connection->version[0], + mpd->connection->version[1], + mpd->connection->version[2]); + exit(EXIT_FAILURE); + } + /* initialize curses */ screen_init(mpd); |