summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2020-04-06 14:32:10 -0500
committerJason Reiss <jreiss@multitech.com>2020-04-06 14:32:10 -0500
commitff7d1ce96caa14fd729b3045b0a8812b29180c35 (patch)
treee2203ec3a4bfa4eaf3be648f8fffc73088b1bdeb
parentd63925da696b9b2238c5a72790819f63455b27d1 (diff)
downloadpacket_forwarder_mtac_full-ff7d1ce96caa14fd729b3045b0a8812b29180c35.tar.gz
packet_forwarder_mtac_full-ff7d1ce96caa14fd729b3045b0a8812b29180c35.tar.bz2
packet_forwarder_mtac_full-ff7d1ce96caa14fd729b3045b0a8812b29180c35.zip
Update lora_pkt_fwd.c 4.0.1-mts-4
-- cancel validation thread on exit
-rw-r--r--lora_pkt_fwd/src/lora_pkt_fwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
index 6e0ef35..8408b94 100644
--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
+++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
@@ -1799,9 +1799,10 @@ int main(int argc, char** argv)
pthread_cancel(thrid_down); /* don't wait for downstream thread */
pthread_cancel(thrid_jit); /* don't wait for jit thread */
pthread_cancel(thrid_timersync); /* don't wait for timer sync thread */
+ pthread_cancel(thrid_valid); /* don't wait for validation thread */
+
if (gps_enabled == true) {
pthread_cancel(thrid_gps); /* don't wait for GPS thread */
- pthread_cancel(thrid_valid); /* don't wait for validation thread */
i = lgw_gps_disable(&gpsdata);
if (i == LGW_HAL_SUCCESS) {
@@ -1811,7 +1812,7 @@ int main(int argc, char** argv)
}
}
- pthread_join(thrid_spectralscan, NULL); /* don't wait for spec scan thread */
+ pthread_join(thrid_spectralscan, NULL); /* wait for spec scan thread */
/* if an exit signal was received, try to quit properly */
if (exit_sig) {