Browse Source

Some code cleanup.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2906 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 16 years ago
parent
commit
244d6aaace
2 changed files with 5 additions and 21 deletions
  1. +4
    -20
      common/JackServer.cpp
  2. +1
    -1
      common/JackServer.h

+ 4
- 20
common/JackServer.cpp View File

@@ -155,37 +155,21 @@ int JackServer::InternalClientLoad(const char* client_name, const char* so_name,
{
JackLoadableInternalClient* client = new JackLoadableInternalClient1(fInstance, GetSynchroTable(), so_name, objet_data);
assert(client);

if (client->Init(so_name) < 0) {
int my_status1 = *status | JackFailure;
*status = (jack_status_t)my_status1;
*int_ref = 0;
return -1;
}

return InternalClientLoadAux(client, client_name, options, int_ref, status);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, status);
}

int JackServer::InternalClientLoad(const char* client_name, const char* so_name, const JSList * parameters, int options, int* int_ref, int* status)
{
JackLoadableInternalClient* client = new JackLoadableInternalClient2(fInstance, GetSynchroTable(), so_name, parameters);
assert(client);
if (client->Init(so_name) < 0) {
int my_status1 = *status | JackFailure;
*status = (jack_status_t)my_status1;
*int_ref = 0;
return -1;
}

return InternalClientLoadAux(client, client_name, options, int_ref, status);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, status);
}

int JackServer::InternalClientLoadAux(JackLoadableInternalClient* client, const char* client_name, int options, int* int_ref, int* status)
int JackServer::InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int* status)
{
// Clear status
*status = 0;
if (client->Open(JACK_DEFAULT_SERVER_NAME, client_name, (jack_options_t)options, (jack_status_t*)status) < 0) {
if ((client->Init(so_name) < 0) || (client->Open(JACK_DEFAULT_SERVER_NAME, client_name, (jack_options_t)options, (jack_status_t*)status) < 0)) {
delete client;
int my_status1 = *status | JackFailure;
*status = (jack_status_t)my_status1;


+ 1
- 1
common/JackServer.h View File

@@ -62,7 +62,7 @@ class SERVER_EXPORT JackServer
bool fFreewheel;
long fLoopback;
int InternalClientLoadAux(JackLoadableInternalClient* client, const char* client_name, int options, int* int_ref, int* status);
int InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int* status);

public:



Loading…
Cancel
Save