From a1c36919884e76c67c19896c526b139d84b8478c Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 14 Mar 2014 13:24:12 +0100 Subject: Update RemoteControl from dabmux --- src/DabMod.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/DabMod.cpp') diff --git a/src/DabMod.cpp b/src/DabMod.cpp index 7a147a0..bd83531 100644 --- a/src/DabMod.cpp +++ b/src/DabMod.cpp @@ -327,7 +327,6 @@ int main(int argc, char* argv[]) try { int telnetport = pt.get("remotecontrol.telnetport"); RemoteControllerTelnet* telnetrc = new RemoteControllerTelnet(telnetport); - telnetrc->start(); rc = telnetrc; } catch (std::exception &e) { @@ -686,6 +685,14 @@ int main(int argc, char* argv[]) // Proccessing data //////////////////////////////////////////////////////////////// flowgraph->run(); + + /* Check every once in a while if the remote control + * is still working */ + if (rc && (frame % 250) == 0 && rc->fault_detected()) { + fprintf(stderr, + "Detected Remote Control fault, restarting it\n"); + rc->restart(); + } } if (framesize == 0) { fprintf(stderr, "End of file reached.\n"); -- cgit v1.2.3