diff options
| author | phintuka <phintuka> | 2009-06-07 12:00:43 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2009-06-07 12:00:43 +0000 |
| commit | 58f0b8419965d59ad03fbd0fe658b23ad558cf1c (patch) | |
| tree | ad0e85fe8b635de8ecd0586e51133ae04cfb94be | |
| parent | 3305d7598f65a6d199c5640de70d8ce0fc8e1218 (diff) | |
| download | xineliboutput-58f0b8419965d59ad03fbd0fe658b23ad558cf1c.tar.gz xineliboutput-58f0b8419965d59ad03fbd0fe658b23ad558cf1c.tar.bz2 | |
Merged revision 1.6
| -rw-r--r-- | tools/vdrdiscovery.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/tools/vdrdiscovery.c b/tools/vdrdiscovery.c index 7bc1ec53..696d3756 100644 --- a/tools/vdrdiscovery.c +++ b/tools/vdrdiscovery.c @@ -7,7 +7,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: vdrdiscovery.c,v 1.5.2.1 2009-02-12 11:24:02 phintuka Exp $ + * $Id: vdrdiscovery.c,v 1.5.2.2 2009-06-07 12:00:43 phintuka Exp $ * */ @@ -79,12 +79,10 @@ static inline int discovery_init(int port) return -1; } -#ifndef FE_STANDALONE int udp_discovery_init(void) { return discovery_init(DISCOVERY_PORT); } -#endif static inline int udp_discovery_send(int fd_discovery, int port, char *msg) { @@ -105,7 +103,6 @@ static inline int udp_discovery_send(int fd_discovery, int port, char *msg) return 0; } -#ifndef FE_STANDALONE int udp_discovery_broadcast(int fd_discovery, int server_port, const char *server_address) { char *msg = NULL; @@ -135,7 +132,7 @@ int udp_discovery_broadcast(int fd_discovery, int server_port, const char *serve return result; } -#else + static inline int udp_discovery_search(int fd_discovery, int port) { char *msg = NULL; @@ -155,11 +152,7 @@ static inline int udp_discovery_search(int fd_discovery, int port) return result; } -#endif -#ifdef FE_STANDALONE -static -#endif int udp_discovery_recv(int fd_discovery, char *buf, int timeout, struct sockaddr_in *source) { @@ -190,10 +183,9 @@ int udp_discovery_recv(int fd_discovery, char *buf, int timeout, return err; } -#ifndef FE_STANDALONE int udp_discovery_is_valid_search(const char *buf) { - const char *id_string = DISCOVERY_1_0_HDR "Client:"; + static const char id_string[] = { DISCOVERY_1_0_HDR "Client:" }; if(!strncmp(id_string, buf, strlen(id_string))) { LOGMSG("Received valid discovery message %s", buf); @@ -203,7 +195,7 @@ int udp_discovery_is_valid_search(const char *buf) LOGDBG("BROADCAST: %s", buf); return 0; } -#else + int udp_discovery_find_server(int *port, char *address) { static const char mystring[] = DISCOVERY_1_0_HDR "Server port: "; @@ -281,5 +273,5 @@ int udp_discovery_find_server(int *port, char *address) close(fd_discovery); return 0; } -#endif + |
