Browse Source

Close remaining client sockets in JackSocketServerChannel::Close.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2758 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
e822ddc370
3 changed files with 12 additions and 1 deletions
  1. +1
    -0
      ChangeLog
  2. +1
    -1
      common/JackEngine.cpp
  3. +10
    -0
      common/JackSocketServerChannel.cpp

+ 1
- 0
ChangeLog View File

@@ -25,6 +25,7 @@ Florian Faber
2008-08-01 Stephane Letz <letz@grame.fr>

* Fix desallocation of remaining clients when server quits.
* Close remaining client sockets in JackSocketServerChannel::Close.

2008-07-25 Stephane Letz <letz@grame.fr>



+ 1
- 1
common/JackEngine.cpp View File

@@ -76,7 +76,7 @@ int JackEngine::Close()
jack_log("JackEngine::Close");
fChannel.Close();
// Close (possibly) remaining clients (RT is stopped)
// Close remaining clients (RT is stopped)
for (int i = 0; i < CLIENT_NUM; i++) {
JackClientInterface* client = fClientTable[i];
if (client) {


+ 10
- 0
common/JackSocketServerChannel.cpp View File

@@ -79,6 +79,16 @@ void JackSocketServerChannel::Close()
{
fThread.Kill();
fRequestListenSocket.Close();

// Close remaining client sockets
std::map<int, std::pair<int, JackClientSocket*> >::iterator it;
for (it = fSocketTable.begin(); it != fSocketTable.end(); it++) {
pair<int, JackClientSocket*> elem = (*it).second;
JackClientSocket* socket = elem.second;
assert(socket);
socket->Close();
delete socket;
}
}

void JackSocketServerChannel::ClientCreate()


Loading…
Cancel
Save