aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main.c15
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);