[hpsdr] ghpsdr3-windows - problem with Ozy further problem
wully
wully at bluewin.ch
Sat Sep 25 08:00:34 PDT 2010
Hi Dave
I have looked into the ghpsdr3 code, because I develop my own DSP-module
and have to restart the software very often. I noticed the problem in
the *server.exe*: the port 15000 is not given up, when the client sends
"detach".
What I did, was to use a flag for the audioThread: (in module client.c)
while(audioThreadFlag) {
...}
instead of while(1) {
...
}
Then, when a client sends detach, I clear the audioThreadFlag and at the
same time, the client sends a last message to the audio_socket, so as to
let the code run into the check
if (audioThreadFlag == 0)
{
fprintf(stderr,"audioThreadFlag auf NULL Socket wird
geschlossen\n");
shutdown(rx->audio_socket,SD_BOTH);
closesocket(rx->audio_socket);
break;
}
This is not a perfect solution, but at least it helps most of the time.
vy 73
HB9EPU, Alfred
More information about the Hpsdr
mailing list