Commit 84c19527 authored by Adrian Knoth's avatar Adrian Knoth
Browse files

Fix promiscuous mode

Original patch by

 Luciano Montanaro <luciano.montanaro@magnetimarelli.com>
parent c6a96da1
......@@ -32,7 +32,11 @@ void JackPosixSemaphore::BuildName(const char* client_name, const char* server_n
{
char ext_client_name[SYNC_MAX_NAME_SIZE + 1];
JackTools::RewriteName(client_name, ext_client_name);
snprintf(res, size, "jack_sem.%d_%s_%s", JackTools::GetUID(), server_name, ext_client_name);
if (getenv("JACK_PROMISCUOUS_SERVER")) {
snprintf(res, size, "jack_sem.%s_%s", server_name, ext_client_name);
} else {
snprintf(res, size, "jack_sem.%d_%s_%s", JackTools::GetUID(), server_name, ext_client_name);
}
}
bool JackPosixSemaphore::Signal()
......
......@@ -33,7 +33,11 @@ static void BuildName(const char* client_name, char* res, const char* dir, int w
{
char ext_client_name[SYNC_MAX_NAME_SIZE + 1];
JackTools::RewriteName(client_name, ext_client_name);
snprintf(res, size, "%s/jack_%s_%d_%d", dir, ext_client_name, JackTools::GetUID(), which);
if (getenv("JACK_PROMISCUOUS_SERVER")) {
snprintf(res, size, "%s/jack_%s_%d", dir, ext_client_name, which);
} else {
snprintf(res, size, "%s/jack_%s_%d_%d", dir, ext_client_name, JackTools::GetUID(), which);
}
}
JackClientSocket::JackClientSocket(int socket): JackClientRequestInterface(), fSocket(socket),fTimeOut(0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment