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];