diff options
author | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2007-10-24 12:39:24 +0000 |
---|---|---|
committer | sletz <sletz@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2007-10-24 12:39:24 +0000 |
commit | 00f55a8038ca5ef796fa905881553e19d487dd26 (patch) | |
tree | 5b27cee87b16ac72fd4d66713763861b7b2b0352 /common/JackSocket.cpp | |
parent | 4f531651664018e1c2293bba1959c642c94d91dd (diff) | |
download | jack2-00f55a8038ca5ef796fa905881553e19d487dd26.tar.gz |
Implementation of server_name setting (-n) in progress (4)
git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1641 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'common/JackSocket.cpp')
-rw-r--r-- | common/JackSocket.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/JackSocket.cpp b/common/JackSocket.cpp index 77d6c0e3..b288b8d7 100644 --- a/common/JackSocket.cpp +++ b/common/JackSocket.cpp @@ -57,8 +57,7 @@ int JackClientSocket::Connect(const char* dir, const char* name, int which) // A } addr.sun_family = AF_UNIX; - snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name); - + snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s_%d", dir, name, which); JackLog("Connect: addr.sun_path %s\n", addr.sun_path); if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { @@ -88,7 +87,6 @@ int JackClientSocket::Connect(const char* dir, int which) addr.sun_family = AF_UNIX; snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%d", dir, which); - JackLog("Connect: addr.sun_path %s\n", addr.sun_path); if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { @@ -191,7 +189,7 @@ int JackServerSocket::Bind(const char* dir, const char* name, int which) // A re addr.sun_family = AF_UNIX; // TO CORRECT: always reuse the same name for now... - snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name); + snprintf(addr.sun_path, sizeof(addr.sun_path) - 1, "%s/jack_%s_%d", dir, name, which); snprintf(fName, sizeof(addr.sun_path) - 1, "%s/jack_%s", dir, name); /* if (access(addr.sun_path, F_OK) == 0) { |