git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2758 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.90
@@ -25,6 +25,7 @@ Florian Faber | |||||
2008-08-01 Stephane Letz <letz@grame.fr> | 2008-08-01 Stephane Letz <letz@grame.fr> | ||||
* Fix desallocation of remaining clients when server quits. | * Fix desallocation of remaining clients when server quits. | ||||
* Close remaining client sockets in JackSocketServerChannel::Close. | |||||
2008-07-25 Stephane Letz <letz@grame.fr> | 2008-07-25 Stephane Letz <letz@grame.fr> | ||||
@@ -76,7 +76,7 @@ int JackEngine::Close() | |||||
jack_log("JackEngine::Close"); | jack_log("JackEngine::Close"); | ||||
fChannel.Close(); | fChannel.Close(); | ||||
// Close (possibly) remaining clients (RT is stopped) | |||||
// Close remaining clients (RT is stopped) | |||||
for (int i = 0; i < CLIENT_NUM; i++) { | for (int i = 0; i < CLIENT_NUM; i++) { | ||||
JackClientInterface* client = fClientTable[i]; | JackClientInterface* client = fClientTable[i]; | ||||
if (client) { | if (client) { | ||||
@@ -79,6 +79,16 @@ void JackSocketServerChannel::Close() | |||||
{ | { | ||||
fThread.Kill(); | fThread.Kill(); | ||||
fRequestListenSocket.Close(); | 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() | void JackSocketServerChannel::ClientCreate() | ||||