From: Juho Vähä-Herttua Date: Tue, 9 Apr 2013 09:29:19 +0000 (+0300) Subject: Make shairplay not exit after 100 seconds X-Git-Tag: upstream/0.9.0~4^2~31 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=258e9fb821c5ee9b39628d1694e48d5518e28ac3;p=deb_shairplay.git Make shairplay not exit after 100 seconds --- diff --git a/src/shairplay.c b/src/shairplay.c index 6ee23ba..9cccf03 100644 --- a/src/shairplay.c +++ b/src/shairplay.c @@ -37,6 +37,9 @@ typedef struct { } shairplay_session_t; +static int running; + + static ao_device * audio_open_device(shairplay_options_t *opt, int bits, int channels, int samplerate) { @@ -283,11 +286,14 @@ main(int argc, char *argv[]) dnssd_register_raop(dnssd, options.apname, options.port, hwaddr, sizeof(hwaddr), 0); dnssd_register_airplay(dnssd, options.apname, 1234, hwaddr, sizeof(hwaddr)); + running = 1; + while (running) { #ifndef WIN32 - sleep(100); + sleep(1); #else - Sleep(100*1000); + Sleep(1000); #endif + } dnssd_unregister_raop(dnssd); dnssd_destroy(dnssd);