summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 362c73b)
raw | patch | inline | side by side (parent: 362c73b)
author | Kalle Wallin <kaw@linux.se> | |
Sat, 20 Mar 2004 08:44:53 +0000 (08:44 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sat, 20 Mar 2004 08:44:53 +0000 (08:44 +0000) |
connection to the server is lost.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@321 09075e82-0dd4-0310-85a5-a0d7c8717e4f
options.c | patch | blob | history | |
options.h | patch | blob | history |
diff --git a/options.c b/options.c
index 33de4c05a87d32878f55b04eb603ea98b560a4dd..03fe3eea90eec3db7b33a7927dc1450724da0367 100644 (file)
--- a/options.c
+++ b/options.c
#endif
{ "version", 'V', 0, 0, 'V', "Display version information." },
{ "keys", 'k', 0, 0, 'k', "Display key bindings." },
+ { "exit", 'e', 0, 0, 'e', "Exit on connection errors." },
{ "port", 'p', POPT_ARG_INT, &options.port, 0,
"Connect to server on port [" DEFAULT_PORT_STR "].", "PORT" },
{ "host", 'h', POPT_ARG_STRING, &options.host, 0,
case 'k':
command_dump_keys();
exit(EXIT_SUCCESS);
+ case 'e':
+ options.reconnect = 0;
+ break;
default:
fprintf(stderr, "%s: %s\n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
options.port = atoi(value);
else
options.port = DEFAULT_PORT;
+ options.reconnect = 1;
}
diff --git a/options.h b/options.h
index 7bf43de9584d3e2d493777d2aba5af22cb0d0204..143be3b2df484b29bb4c33dcffa442ce6117cbe3 100644 (file)
--- a/options.h
+++ b/options.h
{
char *host;
int port;
+ int reconnect;
+ int debug;
} options_t;