summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-09-06 22:30:34 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-09-06 22:30:34 -0400
commit9ada1350eaa70c27e831f99c5d6fda87262cdf85 (patch)
tree53a19d3991e3574a7718e1a93386dfc9aa421b13 /src
parent71427769dec951e073fa7c73fc2435efac381992 (diff)
trigger login box on failure to gather mpd host info on startup
Diffstat (limited to 'src')
-rw-r--r--src/bin/empc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c
index 3a83b3b..b81f0dc 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -3688,8 +3688,7 @@ empd_send_connect(void)
3688 if (p - h > PATH_MAX - 1) 3688 if (p - h > PATH_MAX - 1)
3689 { 3689 {
3690 fprintf(stderr, "MPD_HOST longer than 4096 chars? I don't believe you.\n"); 3690 fprintf(stderr, "MPD_HOST longer than 4096 chars? I don't believe you.\n");
3691 /* FIXME */ 3691 empd_empdd_is_connected_call(empd_proxy, empc_isconnected, NULL);
3692 error_o_doom();
3693 return; 3692 return;
3694 } 3693 }
3695 port = strtol(p + 1, NULL, 10); 3694 port = strtol(p + 1, NULL, 10);
@@ -3706,7 +3705,10 @@ empd_send_connect(void)
3706 else if (!stat("/run/mpd/socket", &st)) 3705 else if (!stat("/run/mpd/socket", &st))
3707 h = "/run/mpd/socket"; 3706 h = "/run/mpd/socket";
3708 } 3707 }
3709 empd_empdd_connect_call(empd_proxy, h ?: "", port, pass ?: ""); 3708 if (h)
3709 empd_empdd_connect_call(empd_proxy, h ?: "", port, pass ?: "");
3710 else
3711 empd_empdd_is_connected_call(empd_proxy, empc_isconnected, NULL);
3710} 3712}
3711 3713
3712static void 3714static void