diff options
author | Max <ikj1234i@yahoo.com> | 2017-07-05 16:51:25 -0400 |
---|---|---|
committer | Max <ikj1234i@yahoo.com> | 2017-07-05 16:51:25 -0400 |
commit | 187f5d180cfd89edc38fa0e7df484e811dbd96c3 (patch) | |
tree | 76815b3c96e606ebfc711866f9f954342c056fa1 | |
parent | 2f3eb8908a789f88557accdc8036212b4b3de197 (diff) |
possible race condition
-rwxr-xr-x | op25/gr-op25_repeater/apps/rx.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/op25/gr-op25_repeater/apps/rx.py b/op25/gr-op25_repeater/apps/rx.py index fa97a2c..4adb19b 100755 --- a/op25/gr-op25_repeater/apps/rx.py +++ b/op25/gr-op25_repeater/apps/rx.py @@ -82,6 +82,9 @@ class p25_rx_block (gr.top_block): # def __init__(self): + self.trunk_rx = None + self.kill_sink = None + gr.top_block.__init__(self) # command line argument parsing @@ -278,7 +281,6 @@ class p25_rx_block (gr.top_block): # connect it all up self.connect(source, self.demod, self.decoder) - self.kill_sink = None if self.options.plot_mode == 'constellation': assert self.options.demod_type == 'cqpsk' ## constellation requires cqpsk demod-type self.constellation_sink = constellation_sink_c() @@ -598,6 +600,8 @@ class p25_rx_block (gr.top_block): s = msg.to_string() if s == 'quit': return True elif s == 'update': + if self.trunk_rx is None: + return False ## possible race cond - just ignore js = self.trunk_rx.to_json() msg = gr.message().make_from_string(js, -4, 0, 0) self.input_q.insert_tail(msg) |