diff options
author | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-11-23 16:06:05 +0100 |
---|---|---|
committer | Ronan Le Martret <ronan.lemartret@iot.bzh> | 2017-11-23 16:06:05 +0100 |
commit | 720e487cab65588faf43907b10dd36266b0779a9 (patch) | |
tree | 826bdcc7595476b0e2caf214aa20a447d0dcd50d /alsa-hook/PolicyAlsaHook.c | |
parent | 9e61ad7e7b8d2742822138d2d02bc5356204936c (diff) |
Fix infinity loop erroreel_4.99.3eel/4.99.34.99.3
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'alsa-hook/PolicyAlsaHook.c')
-rw-r--r-- | alsa-hook/PolicyAlsaHook.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/alsa-hook/PolicyAlsaHook.c b/alsa-hook/PolicyAlsaHook.c index 44f5ce9..146ff5b 100644 --- a/alsa-hook/PolicyAlsaHook.c +++ b/alsa-hook/PolicyAlsaHook.c @@ -111,10 +111,14 @@ static void *LoopInThread(void *handle) { for (;;) { if (afbClient->verbose) printf("ON-MAINLOOP ping=%d\n", count++); - sd_event_run(afbClient->sdLoop, watchdog); - } + int res = sd_event_run(afbClient->sdLoop, watchdog); - return NULL; + if ( res < 0 ) + { + printf("ERROR in LoopInThread \"%i\" Break ON-MAINLOOP.\n", res); + break; + } + } } // lost connect with the AudioDaemon |