diff options
author | falkTX <falktx@falktx.com> | 2019-09-25 03:01:52 +0100 |
---|---|---|
committer | Filipe Coelho <falktx@falktx.com> | 2019-09-25 03:06:49 +0100 |
commit | 9a5dbf26a7a422d82672e993683bd42ce3b66baf (patch) | |
tree | 7eaac87d209b60676b8fc9a54da845a3278d5fcc | |
parent | 18177e3d51615e1aee344dc47beef87f174b2398 (diff) | |
download | jack2-9a5dbf26a7a422d82672e993683bd42ce3b66baf.tar.gz |
Remove all port properties when unregistering
-rw-r--r-- | common/JackEngine.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/common/JackEngine.cpp b/common/JackEngine.cpp index 229de0f1..824e0b97 100644 --- a/common/JackEngine.cpp +++ b/common/JackEngine.cpp @@ -773,15 +773,15 @@ int JackEngine::ClientCloseAux(int refnum, bool wait) } } - // Notify running clients - NotifyRemoveClient(client->GetClientControl()->fName, refnum); - fMetadata.RemoveProperties(NULL, uuid); /* have to do the notification ourselves, since the client argument to fMetadata->RemoveProperties() was NULL */ PropertyChangeNotify(uuid, NULL, PropertyDeleted); + // Notify running clients + NotifyRemoveClient(client->GetClientControl()->fName, refnum); + // Cleanup... fSynchroTable[refnum].Destroy(); fEngineControl->ResetRollingUsecs(); @@ -909,6 +909,13 @@ int JackEngine::PortUnRegister(int refnum, jack_port_id_t port_index) PortDisconnect(-1, port_index, ALL_PORTS); if (fGraphManager->ReleasePort(refnum, port_index) == 0) { + const jack_uuid_t uuid = jack_port_uuid_generate(port_index); + if (!jack_uuid_empty(uuid)) + { + fMetadata.RemoveProperties(NULL, uuid); + PropertyChangeNotify(uuid, NULL, PropertyDeleted); + } + if (client->GetClientControl()->fActive) { NotifyPortRegistation(port_index, false); } |