aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-06-09 17:31:24 +0000
committerKalle Wallin <kaw@linux.se>2004-06-09 17:31:24 +0000
commit72c0b2270d207e32a2124ce6439214e5e8139e57 (patch)
treeb20f394ba2cb3f036d90cd9f84def6fe8e6a8d27 /src/main.c
parenta14b635343ebdcb711885d840687d181ebd2bfbb (diff)
downloadmpd-72c0b2270d207e32a2124ce6439214e5e8139e57.tar.gz
mpd-72c0b2270d207e32a2124ce6439214e5e8139e57.tar.xz
mpd-72c0b2270d207e32a2124ce6439214e5e8139e57.zip
Updated the reconnect code to allow user to abort in raw mode
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1422 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 176bcf8a0..7a44f0985 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,7 +1,7 @@
/*
* $Id$
*
- * (c) 2004 by Kalle Wallin (kaw@linux.se)
+ * (c) 2004 by Kalle Wallin <kaw@linux.se>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -168,6 +168,7 @@ main(int argc, const char *argv[])
}
else
mpd_finishCommand(mpc->connection);
+
g_timer_start(timer);
}
@@ -188,9 +189,10 @@ main(int argc, const char *argv[])
}
else if( options->reconnect )
{
- sleep(MPD_RECONNECT_TIMEOUT);
- screen_status_printf(_("Connecting to %s... [Press Ctrl-C to abort]"),
- options->host);
+ if( get_keyboard_command_with_timeout(MPD_RECONNECT_TIME)==CMD_QUIT)
+ exit(EXIT_SUCCESS);
+ screen_status_printf(_("Connecting to %s... [Press %s to abort]"),
+ options->host, get_key_names(CMD_QUIT,0) );
if( mpc_reconnect(mpc,
options->host,
options->port,