Browse Source

Correct JackServerGlobals::Init: now check is server is already started.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2166 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
ba881e40ac
3 changed files with 9 additions and 11 deletions
  1. +4
    -0
      ChangeLog
  2. +5
    -10
      common/JackServerGlobals.cpp
  3. +0
    -1
      common/JackTools.cpp

+ 4
- 0
ChangeLog View File

@@ -20,6 +20,10 @@ Fernando Lopez-Lezcano
Jackdmp changes log
---------------------------

2008-04-25 Stephane Letz <letz@grame.fr>
* Correct JackServerGlobals::Init: now check is server is already started.

2008-04-24 Stephane Letz <letz@grame.fr>
* Correct internal client load.


+ 5
- 10
common/JackServerGlobals.cpp View File

@@ -27,10 +27,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "shm.h"
#include <getopt.h>

#ifndef WIN32
#include <dirent.h>
#endif

static char* server_name = NULL;

namespace Jack
@@ -75,6 +71,11 @@ int JackServerGlobals::Delete()

bool JackServerGlobals::Init()
{
// Server already started
if (JackServer::fInstance != NULL)
return true;
// Otherwise first client starts the server
if (fClientCount++ == 0) {

jack_log("JackServerGlobals Init");
@@ -282,9 +283,7 @@ bool JackServerGlobals::Init()

/* clean up shared memory and files from any previous instance of this server name */
jack_cleanup_shm();
#ifndef WIN32
JackTools::CleanupFiles(server_name);
#endif

if (!realtime && client_timeout == 0)
client_timeout = 500; /* 0.5 sec; usable when non realtime. */
@@ -298,9 +297,7 @@ bool JackServerGlobals::Init()
jack_error("Cannot start server... exit");
Delete();
jack_cleanup_shm();
#ifndef WIN32
JackTools::CleanupFiles(server_name);
#endif
jack_unregister_server(server_name);
goto error;
}
@@ -319,9 +316,7 @@ void JackServerGlobals::Destroy()
jack_log("JackServerGlobals Destroy");
Stop();
jack_cleanup_shm();
#ifndef WIN32
JackTools::CleanupFiles(server_name);
#endif
jack_unregister_server(server_name);
}
}


+ 0
- 1
common/JackTools.cpp View File

@@ -209,5 +209,4 @@ void JackTools::RewriteName(const char* name, char* new_name)
new_name[i] = '\0';
}


}

Loading…
Cancel
Save