chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ev_reader and ev_writer now own the FDs you give them. This is
[disorder]
/
clients
/
disorder.c
diff --git
a/clients/disorder.c
b/clients/disorder.c
index 5ccb625812b4b937ca43e97dca1015bfd5f45ce5..58177668ba2b05550e480e57ed578b94eb4549e8 100644
(file)
--- a/
clients/disorder.c
+++ b/
clients/disorder.c
@@
-1,6
+1,6
@@
/*
* This file is part of DisOrder.
/*
* This file is part of DisOrder.
- * Copyright (C) 2004, 2005, 2006 Richard Kettlewell
+ * Copyright (C) 2004, 2005, 2006
, 2007
Richard Kettlewell
*
* 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
*
* 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
@@
-399,6
+399,14
@@
static void cf_new(disorder_client *c,
xprintf("%s\n", nullcheck(utf82mb(*vec++)));
}
xprintf("%s\n", nullcheck(utf82mb(*vec++)));
}
+static void cf_rtp_address(disorder_client *c,
+ char attribute((unused)) **argv) {
+ char *address, *port;
+
+ if(disorder_rtp_address(c, &address, &port)) exit(EXIT_FAILURE);
+ xprintf("address: %s\nport: %s\n", address, port);
+}
+
static const struct command {
const char *name;
int min, max;
static const struct command {
const char *name;
int min, max;
@@
-467,6
+475,8
@@
static const struct command {
"Resolve alias for TRACK" },
{ "resume", 0, 0, cf_resume, 0, "",
"Resume after a pause" },
"Resolve alias for TRACK" },
{ "resume", 0, 0, cf_resume, 0, "",
"Resume after a pause" },
+ { "rtp-address", 0, 0, cf_rtp_address, 0, "",
+ "Report server's broadcast address" },
{ "scratch", 0, 0, cf_scratch, 0, "",
"Scratch the currently playing track" },
{ "scratch-id", 1, 1, cf_scratch, 0, "ID",
{ "scratch", 0, 0, cf_scratch, 0, "",
"Scratch the currently playing track" },
{ "scratch-id", 1, 1, cf_scratch, 0, "ID",
@@
-523,7
+533,6
@@
static void help_commands(void) {
int main(int argc, char **argv) {
int n, i, j;
disorder_client *c = 0;
int main(int argc, char **argv) {
int n, i, j;
disorder_client *c = 0;
- const char *s;
int status = 0;
struct vector args;
int status = 0;
struct vector args;
@@
-544,7
+553,6
@@
int main(int argc, char **argv) {
}
if(config_read(0)) fatal(0, "cannot read configuration");
if(!(c = disorder_new(1))) exit(EXIT_FAILURE);
}
if(config_read(0)) fatal(0, "cannot read configuration");
if(!(c = disorder_new(1))) exit(EXIT_FAILURE);
- s = config_get_file("socket");
if(disorder_connect(c)) exit(EXIT_FAILURE);
n = optind;
/* accumulate command args */
if(disorder_connect(c)) exit(EXIT_FAILURE);
n = optind;
/* accumulate command args */