Browse Source

Cleanup

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2394 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
93d2e5d2fa
6 changed files with 18 additions and 13 deletions
  1. +0
    -1
      common/JackNotification.h
  2. +10
    -7
      common/JackServer.cpp
  3. +5
    -2
      common/JackServer.h
  4. +1
    -1
      common/JackSocketServerChannel.cpp
  5. +1
    -1
      macosx/JackMachServerChannel.cpp
  6. +1
    -1
      windows/JackWinNamedPipeServerChannel.cpp

+ 0
- 1
common/JackNotification.h View File

@@ -36,7 +36,6 @@ enum NotificationType {
kPortConnectCallback = 10,
kPortDisconnectCallback = 11,
kRealTimeCallback = 12,
kDeadClient = 13,
kMaxNotification
};



+ 10
- 7
common/JackServer.cpp View File

@@ -253,7 +253,7 @@ int JackServer::SetFreewheel(bool onoff)
}
}

// Coming from the RT thread or server channel
// Coming from the RT thread
void JackServer::Notify(int refnum, int notify, int value)
{
switch (notify) {
@@ -266,12 +266,15 @@ void JackServer::Notify(int refnum, int notify, int value)
fEngine->NotifyXRun(refnum);
break;

case kDeadClient:
jack_log("JackServer: kDeadClient ref = %ld", refnum);
if (fEngine->ClientDeactivate(refnum) < 0)
jack_error("JackServer: DeadClient ref = %ld cannot be removed from the graph !!", refnum);
fEngine->ClientExternalClose(refnum);
break;
}
}

void JackServer::DeadClient(int refnum)
{
jack_log("JackServer::DeadClient ref = %ld", refnum);
if (fEngine->ClientDeactivate(refnum) < 0) {
jack_error("JackServer::DeadClient ref = %ld cannot be removed from the graph !!", refnum);
fEngine->ClientExternalClose(refnum);
}
}



+ 5
- 2
common/JackServer.h View File

@@ -72,11 +72,14 @@ class EXPORT JackServer : private detail::JackGlobalsServerInitializer
int Start();
int Stop();

int SetBufferSize(jack_nframes_t buffer_size);
int SetFreewheel(bool onoff);
// RT thread
void Notify(int refnum, int notify, int value);

// Command thread : API
int SetBufferSize(jack_nframes_t buffer_size);
int SetFreewheel(bool onoff);
int InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int* status);
void DeadClient(int refnum);

// Transport management
int ReleaseTimebase(int refnum);


+ 1
- 1
common/JackSocketServerChannel.cpp View File

@@ -126,7 +126,7 @@ void JackSocketServerChannel::ClientKill(int fd)
if (refnum == -1) { // Should never happen... correspond to a client that started the socket but never opened...
jack_log("Client was not opened : probably correspond to server_check");
} else {
fServer->Notify(refnum, kDeadClient, 0);
fServer->DeadClient(refnum);
}

fSocketTable.erase(fd);


+ 1
- 1
macosx/JackMachServerChannel.cpp View File

@@ -122,7 +122,7 @@ void JackMachServerChannel::ClientKill(mach_port_t private_port)
jack_log("JackMachServerChannel::ClientKill");
int refnum = fClientTable[private_port];
assert(refnum > 0);
fServer->Notify(refnum, kDeadClient, 0);
fServer->DeadClient(refnum);
fClientTable.erase(private_port);

// Hum, hum....


+ 1
- 1
windows/JackWinNamedPipeServerChannel.cpp View File

@@ -344,7 +344,7 @@ void JackClientPipeThread::ClientKill()
} else if (fRefNum == 0) { // Correspond to a still not opened client.
jack_log("Kill a not opened client");
} else {
fServer->Notify(fRefNum, kDeadClient, 0);
fServer->DeadClient(fRefNum);
}

Close();


Loading…
Cancel
Save