Code

main: don't show (null) as the server name
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Wed, 15 Jun 2011 20:00:24 +0000 (22:00 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 23 Jun 2011 08:50:50 +0000 (10:50 +0200)
commitb774eac8d9b449ba2a78eafcc88f64251583e18d
treee16ab362f3faeff79dff1a993ce47ce397baeafd
parent502d803a2efc9f7de5560f86829e33bf78e47584
main: don't show (null) as the server name

With libmpdclient older than version 2.4.0, connection_settings_name()
will return g_strdup(options.host), but options.host can be NULL.

Return g_strdup("localhost") in that case, assuming localhost is
mpd_connection_new's "default host".
src/main.c