projects
/
pihpsdr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61f8c5c
)
RigCtl: made "waiting" for the serial thread even more secure.
author
c vw
<dl1ycf@darc.de>
Tue, 26 May 2020 16:41:57 +0000
(18:41 +0200)
committer
c vw
<dl1ycf@darc.de>
Tue, 26 May 2020 16:41:57 +0000
(18:41 +0200)
rigctl.c
patch
|
blob
|
history
diff --git
a/rigctl.c
b/rigctl.c
index 58787b0046589243e3ead44bd3492ac26020be5b..6b90735d6580ecd7eed743fcf360dbafe32820b5 100644
(file)
--- a/
rigctl.c
+++ b/
rigctl.c
@@
-3987,8
+3987,11
@@
int launch_serial () {
void disable_serial () {
g_print("RIGCTL: Disable Serial port %s\n",ser_port);
serial_running=FALSE;
- g_thread_join(serial_server_thread_id);
- close(fd);
+ // wait for the serial server actually terminating
+ if (serial_server_thread_id) {
+ g_thread_join(serial_server_thread_id);
+ }
+ serial_server_thread_id=NULL;
}
//