Browse Source

Cleanup.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4701 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 13 years ago
parent
commit
5d7fbdc066
7 changed files with 12 additions and 11 deletions
  1. +2
    -1
      common/JackAPI.cpp
  2. +1
    -1
      common/JackRequestDecoder.cpp
  3. +1
    -1
      common/Jackdmp.cpp
  4. +2
    -2
      posix/JackSocket.cpp
  5. +2
    -2
      posix/JackSocketServerChannel.cpp
  6. +3
    -3
      windows/JackWinNamedPipe.cpp
  7. +1
    -1
      windows/JackWinNamedPipeServerChannel.cpp

+ 2
- 1
common/JackAPI.cpp View File

@@ -310,8 +310,9 @@ LIB_EXPORT jack_client_t* jack_client_new(const char* client_name)
JackGlobals::fOpenMutex->Lock(); JackGlobals::fOpenMutex->Lock();
jack_error("jack_client_new: deprecated"); jack_error("jack_client_new: deprecated");
int options = JackUseExactName; int options = JackUseExactName;
if (getenv("JACK_START_SERVER") == NULL)
if (getenv("JACK_START_SERVER") == NULL) {
options |= JackNoStartServer; options |= JackNoStartServer;
}
jack_client_t* res = jack_client_new_aux(client_name, (jack_options_t)options, NULL); jack_client_t* res = jack_client_new_aux(client_name, (jack_options_t)options, NULL);
JackGlobals::fOpenMutex->Unlock(); JackGlobals::fOpenMutex->Unlock();
return res; return res;


+ 1
- 1
common/JackRequestDecoder.cpp View File

@@ -42,7 +42,7 @@ JackRequestDecoder::JackRequestDecoder(JackServer* server, JackClientHandlerInte
JackRequestDecoder::~JackRequestDecoder() JackRequestDecoder::~JackRequestDecoder()
{} {}


int JackRequestDecoder::HandleRequest(detail::JackChannelTransactionInterface* socket, int type_aux)
int JackRequestDecoder::HandleRequest(detail::JackChannelTransactionInterface* socket, int type_aux)
{ {
JackRequest::RequestType type = (JackRequest::RequestType)type_aux; JackRequest::RequestType type = (JackRequest::RequestType)type_aux;


+ 1
- 1
common/Jackdmp.cpp View File

@@ -88,7 +88,7 @@ static void copyright(FILE* file)
{ {
fprintf(file, "jackdmp " VERSION "\n" fprintf(file, "jackdmp " VERSION "\n"
"Copyright 2001-2005 Paul Davis and others.\n" "Copyright 2001-2005 Paul Davis and others.\n"
"Copyright 2004-2011 Grame.\n"
"Copyright 2004-2012 Grame.\n"
"jackdmp comes with ABSOLUTELY NO WARRANTY\n" "jackdmp comes with ABSOLUTELY NO WARRANTY\n"
"This is free software, and you are welcome to redistribute it\n" "This is free software, and you are welcome to redistribute it\n"
"under certain conditions; see the file COPYING for details\n"); "under certain conditions; see the file COPYING for details\n");


+ 2
- 2
posix/JackSocket.cpp View File

@@ -120,7 +120,7 @@ int JackClientSocket::Connect(const char* dir, const char* name, int which) // A


addr.sun_family = AF_UNIX; addr.sun_family = AF_UNIX;
BuildName(name, addr.sun_path, dir, which); BuildName(name, addr.sun_path, dir, which);
jack_log("Connect: addr.sun_path %s", addr.sun_path);
jack_log("JackClientSocket::Connect : addr.sun_path %s", addr.sun_path);


if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { if (connect(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
jack_error("Cannot connect to server socket err = %s", strerror(errno)); jack_error("Cannot connect to server socket err = %s", strerror(errno));
@@ -254,7 +254,7 @@ int JackServerSocket::Bind(const char* dir, const char* name, int which) // A re
BuildName(name, fName, dir, which); BuildName(name, fName, dir, which);
strncpy(addr.sun_path, fName, sizeof(addr.sun_path) - 1); strncpy(addr.sun_path, fName, sizeof(addr.sun_path) - 1);


jack_log("Bind: addr.sun_path %s", addr.sun_path);
jack_log("JackServerSocket::Bind : addr.sun_path %s", addr.sun_path);
unlink(fName); // Security... unlink(fName); // Security...


if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) { if (bind(fSocket, (struct sockaddr*)&addr, sizeof(addr)) < 0) {


+ 2
- 2
posix/JackSocketServerChannel.cpp View File

@@ -116,7 +116,7 @@ int JackSocketServerChannel::GetFd(JackClientSocket* socket_aux)
{ {
std::map<int, std::pair<int, JackClientSocket*> >::iterator it; std::map<int, std::pair<int, JackClientSocket*> >::iterator it;


for (it = fSocketTable.begin(); it != fSocketTable.end(); it++) {
for (it = fSocketTable.begin(); it != fSocketTable.end(); it++) {
pair<int, JackClientSocket*> elem = (*it).second; pair<int, JackClientSocket*> elem = (*it).second;
JackClientSocket* socket = elem.second; JackClientSocket* socket = elem.second;
if (socket_aux == socket) { if (socket_aux == socket) {
@@ -141,7 +141,7 @@ void JackSocketServerChannel::ClientAdd(detail::JackChannelTransactionInterface*
#ifdef __APPLE__ #ifdef __APPLE__
int on = 1; int on = 1;
if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) { if (setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, (const char*)&on, sizeof(on)) < 0) {
jack_log("JackSocketServerChannel::ClientAdd : setsockopt SO_NOSIGPIPE fd = %ld err = %s", fd, strerror(errno));
jack_log("JackSocketServerChannel::ClientAdd : setsockopt SO_NOSIGPIPE fd = %ld err = %s", fd, strerror(errno));
} }
#endif #endif
} else { } else {


+ 3
- 3
windows/JackWinNamedPipe.cpp View File

@@ -81,7 +81,7 @@ int JackWinNamedPipeClient::ConnectAux()


int JackWinNamedPipeClient::ConnectAux() int JackWinNamedPipeClient::ConnectAux()
{ {
jack_log("Connect: fName %s", fName);
jack_log("JackWinNamedPipeClient::ConnectAux : fName %s", fName);


while (true) { while (true) {


@@ -254,7 +254,7 @@ int JackWinAsyncNamedPipeClient::Write(void* data, int len)
// Server side // Server side
int JackWinNamedPipeServer::BindAux() int JackWinNamedPipeServer::BindAux()
{ {
jack_log("Bind: fName %s", fName);
jack_log("JackWinNamedPipeServer::BindAux : fName %s", fName);


if ((fNamedPipe = CreateNamedPipe(fName, if ((fNamedPipe = CreateNamedPipe(fName,
PIPE_ACCESS_DUPLEX, // read/write access PIPE_ACCESS_DUPLEX, // read/write access
@@ -338,7 +338,7 @@ int JackWinNamedPipeServer::Close()


int JackWinAsyncNamedPipeServer::BindAux() int JackWinAsyncNamedPipeServer::BindAux()
{ {
jack_log("Bind: fName %s", fName);
jack_log("JackWinAsyncNamedPipeServer::BindAux : fName %s", fName);


if ((fNamedPipe = CreateNamedPipe(fName, if ((fNamedPipe = CreateNamedPipe(fName,
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, // read/write access


+ 1
- 1
windows/JackWinNamedPipeServerChannel.cpp View File

@@ -523,7 +523,7 @@ JackWinNamedPipeServerChannel::~JackWinNamedPipeServerChannel()


int JackWinNamedPipeServerChannel::Open(const char* server_name, JackServer* server) int JackWinNamedPipeServerChannel::Open(const char* server_name, JackServer* server)
{ {
jack_log("JackWinNamedPipeServerChannel::Open ");
jack_log("JackWinNamedPipeServerChannel::Open");
snprintf(fServerName, sizeof(fServerName), server_name); snprintf(fServerName, sizeof(fServerName), server_name);


// Needed for internal connection from JackWinNamedPipeServerNotifyChannel object // Needed for internal connection from JackWinNamedPipeServerNotifyChannel object


Loading…
Cancel
Save