summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 63e1f00)
raw | patch | inline | side by side (parent: 63e1f00)
author | Daniel Friesel <derf@derf.homelinux.org> | |
Fri, 30 Apr 2010 17:05:11 +0000 (19:05 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 21 Jul 2010 06:04:56 +0000 (08:04 +0200) |
This fixes the "Connecting to localhost" message if "MPD_HOST=mpd ncmpc" is used.
src/options.c | patch | blob | history |
diff --git a/src/options.c b/src/options.c
index db72e3b549f64d510a755d9be78528f703cb6bb4..e863c726f7173ddb73870d9338ee2aff4d92e42a 100644 (file)
--- a/src/options.c
+++ b/src/options.c
option_cb (opt->shortopt, NULL);
else if (opt && opt->argument)
option_error(ERROR_MISSING_ARGUMENT, opt->longopt, opt->argument);
+
+ if (!options.host && getenv("MPD_HOST")) {
+ g_free(options.host);
+ options.host = g_strdup(getenv("MPD_HOST"));
+ }
}
void