From dbc92abfb9c3c84e8280d7dbd243dfe2ba5bfe1b Mon Sep 17 00:00:00 2001 From: seife Date: Sun, 20 Feb 2011 18:22:35 +0000 Subject: [PATCH] zapit: allow to abort scan even if NIT never finishes git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1178 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/zapit/src/nit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/zapit/src/nit.cpp b/src/zapit/src/nit.cpp index a06a4ff95..e2ba9ff02 100644 --- a/src/zapit/src/nit.cpp +++ b/src/zapit/src/nit.cpp @@ -31,6 +31,7 @@ #include #define NIT_SIZE 1024 +extern short abort_scan; void *nit_thread(void * data) { @@ -94,6 +95,10 @@ int parse_nit(t_satellite_position satellitePosition, freq_id_t freq) delete dmx; return -1; } + if (abort_scan) { + ret = -1; + goto _return; + } if(buffer[0] != 0x40) printf("[NIT] ******************************************* Bogus section received: 0x%x\n", buffer[0]); section_length = ((buffer[1] & 0x0F) << 8) + buffer[2];