Browse Source

Fix JackSocketClientChannel::ClientClose: async call from the client and server does not need to write any reply.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1906 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.71
sletz 17 years ago
parent
commit
e485162d0e
4 changed files with 16 additions and 6 deletions
  1. +5
    -0
      ChangeLog
  2. +8
    -2
      common/JackEngine.cpp
  3. +1
    -1
      common/JackSocketClientChannel.cpp
  4. +2
    -3
      common/JackSocketServerChannel.cpp

+ 5
- 0
ChangeLog View File

@@ -18,6 +18,11 @@ Marc-Olivier Barre
Jackdmp changes log
---------------------------

2008-03-06 Stephane Letz <letz@grame.fr>
* Fix JackSocketClientChannel::ClientClose: async call from the client and server does not need to write any reply.
* Correct port notification: 2 notifications have to be sent (src, dst) and (dst, src)...

2008-03-05 Stephane Letz <letz@grame.fr>
* libjackdmp.so renamed to libjackservermp.so and same for OSX framework.


+ 8
- 2
common/JackEngine.cpp View File

@@ -562,7 +562,7 @@ int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wai
ReleaseRefnum(refnum);

// Notiy unregister
jack_int_t ports[PORT_NUM_FOR_CLIENT];
jack_int_t ports[PORT_NUM_FOR_CLIENT];
int i;
fGraphManager->GetInputPorts(refnum, ports);
@@ -704,8 +704,10 @@ int JackEngine::PortConnect(int refnum, jack_port_id_t src, jack_port_id_t dst)
}
int res = fGraphManager->Connect(src, dst);
if (res == 0)
if (res == 0) {
NotifyPortConnect(src, dst, true);
NotifyPortConnect(dst, src, true);
}
return res;
}

@@ -718,6 +720,7 @@ int JackEngine::PortDisconnect(int refnum, const char* src, const char* dst)
return -1;
} else if (fGraphManager->Disconnect(port_src, port_dst) == 0){
NotifyPortConnect(port_src, port_dst, false);
NotifyPortConnect(port_dst, port_src, false);
return 0;
} else {
return -1;
@@ -739,11 +742,13 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) {
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", src, connections[i]);
NotifyPortConnect(src, connections[i], false);
NotifyPortConnect(connections[i], src, false);
}
} else {
for (int i = 0; (i < CONNECTION_NUM) && (connections[i] != EMPTY); i++) {
JackLog("NotifyPortConnect src = %ld dst = %ld false\n", connections[i], src);
NotifyPortConnect(connections[i], src, false);
NotifyPortConnect(connections[i], src, false);
}
}
@@ -753,6 +758,7 @@ int JackEngine::PortDisconnect(int refnum, jack_port_id_t src, jack_port_id_t ds
} else if (fGraphManager->Disconnect(src, dst) == 0) {
// Notifications
NotifyPortConnect(src, dst, false);
NotifyPortConnect(dst, src, false);
return 0;
} else {
return -1;


+ 1
- 1
common/JackSocketClientChannel.cpp View File

@@ -162,7 +162,7 @@ void JackSocketClientChannel::ClientClose(int refnum, int* result)
{
JackClientCloseRequest req(refnum);
JackResult res;
ServerSyncCall(&req, &res, result);
ServerAsyncCall(&req, &res, result);
}

void JackSocketClientChannel::ClientActivate(int refnum, int* result)


+ 2
- 3
common/JackSocketServerChannel.cpp View File

@@ -179,9 +179,8 @@ int JackSocketServerChannel::HandleRequest(int fd)
JackResult res;
if (req.Read(socket) == 0)
res.fResult = fServer->GetEngine()->ClientExternalClose(req.fRefNum);
if (res.Write(socket) < 0)
jack_error("JackRequest::kClientClose write error ref = %d", req.fRefNum);
ClientRemove(fd, req.fRefNum);
// No write: client is actually doing an "ServerAsyncCall", and not interested by the result
ClientRemove(fd, req.fRefNum);
break;
}



Loading…
Cancel
Save