Commit 9bf10e24 authored by Stéphane LETZ's avatar Stéphane LETZ
Browse files

Correct InternalClientLoad.

parent 4bd4f5b1
......@@ -121,7 +121,7 @@ class JackClientChannelInterface
virtual void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result)
{}
virtual void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result)
virtual void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int uuid, int* result)
{}
virtual void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
......
......@@ -1058,7 +1058,8 @@ int JackClient::InternalClientLoad(const char* client_name, jack_options_t optio
}
int int_ref, result = -1;
fChannel->InternalClientLoad(GetClientControl()->fRefNum, client_name, va->load_name, va->load_init, options, (int*)status, &int_ref, &result);
// UUID TO CHECK
fChannel->InternalClientLoad(GetClientControl()->fRefNum, client_name, va->load_name, va->load_init, options, (int*)status, &int_ref, -1, &result);
return int_ref;
}
......
......@@ -123,7 +123,7 @@ class JackClient : public JackClientInterface, public JackRunnableInterface
JackClient(JackSynchro* table);
virtual ~JackClient();
virtual int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid) = 0;
virtual int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status) = 0;
virtual int Close();
virtual JackGraphManager* GetGraphManager() const = 0;
......
......@@ -1179,7 +1179,7 @@ EXPORT bool jackctl_server_load_internal(
{
int status;
if (server_ptr->engine != NULL) {
server_ptr->engine->InternalClientLoad(internal->desc_ptr->name, internal->desc_ptr->name, internal->set_parameters, JackNullOption, &internal->refnum, &status, -1);
server_ptr->engine->InternalClientLoad(internal->desc_ptr->name, internal->desc_ptr->name, internal->set_parameters, JackNullOption, &internal->refnum, -1, &status);
return (internal->refnum > 0);
} else {
return false;
......
......@@ -78,9 +78,9 @@ JackDebugClient::~JackDebugClient()
delete fClient;
}
int JackDebugClient::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid)
int JackDebugClient::Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status)
{
int res = fClient->Open(server_name, name, options, status, uuid);
int res = fClient->Open(server_name, name, uuid, options, status);
char provstr[256];
char buffer[256];
time_t curtime;
......
......@@ -68,7 +68,7 @@ class JackDebugClient : public JackClient
JackDebugClient(JackClient* fTheClient);
virtual ~JackDebugClient();
virtual int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid);
virtual int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
int Close();
virtual JackGraphManager* GetGraphManager() const;
......
......@@ -63,7 +63,7 @@ JackInternalClient::~JackInternalClient()
delete fChannel;
}
int JackInternalClient::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid)
int JackInternalClient::Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status)
{
int result;
char name_res[JACK_CLIENT_NAME_SIZE + 1];
......@@ -198,11 +198,11 @@ JackLoadableInternalClient::~JackLoadableInternalClient()
UnloadJackModule(fHandle);
}
int JackLoadableInternalClient1::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid)
int JackLoadableInternalClient1::Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status)
{
int res = -1;
if (JackInternalClient::Open(server_name, name, options, status, uuid) == 0) {
if (JackInternalClient::Open(server_name, name, uuid, options, status) == 0) {
if (fInitialize((jack_client_t*)this, fObjectData) == 0) {
res = 0;
} else {
......@@ -214,11 +214,11 @@ int JackLoadableInternalClient1::Open(const char* server_name, const char* name,
return res;
}
int JackLoadableInternalClient2::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid)
int JackLoadableInternalClient2::Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status)
{
int res = -1;
if (JackInternalClient::Open(server_name, name, options, status, uuid) == 0) {
if (JackInternalClient::Open(server_name, name, uuid, options, status) == 0) {
if (fInitialize((jack_client_t*)this, fParameters) == 0) {
res = 0;
} else {
......
......@@ -46,7 +46,7 @@ class JackInternalClient : public JackClient
JackInternalClient(JackServer* server, JackSynchro* table);
virtual ~JackInternalClient();
int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid);
int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
JackGraphManager* GetGraphManager() const;
JackEngineControl* GetEngineControl() const;
......@@ -100,7 +100,7 @@ class JackLoadableInternalClient1 : public JackLoadableInternalClient
{}
int Init(const char* so_name);
int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid);
int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
};
......@@ -119,7 +119,7 @@ class JackLoadableInternalClient2 : public JackLoadableInternalClient
{}
int Init(const char* so_name);
int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid);
int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
};
......
......@@ -137,9 +137,9 @@ class JackInternalClientChannel : public detail::JackClientChannelInterface
*result = fEngine->InternalClientHandle(client_name, status, int_ref);
}
void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result, int uuid)
void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int uuid, int* result)
{
*result = fServer->InternalClientLoad(client_name, so_name, objet_data, options, int_ref, status, uuid);
*result = fServer->InternalClientLoad(client_name, so_name, objet_data, options, int_ref, uuid, status);
}
void InternalClientUnload(int refnum, int int_ref, int* status, int* result)
......
......@@ -96,7 +96,7 @@ jack_client_t* jack_client_new_aux(const char* client_name, jack_options_t optio
client = new JackLibClient(GetSynchroTable());
}
int res = client->Open(va.server_name, client_name, options, status, va.session_id);
int res = client->Open(va.server_name, client_name, va.session_id, options, status);
if (res < 0) {
delete client;
JackLibGlobals::Destroy(); // jack library destruction
......@@ -149,7 +149,7 @@ jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t opti
client = new JackLibClient(GetSynchroTable());
}
int res = client->Open(va.server_name, client_name, options, status, va.session_id);
int res = client->Open(va.server_name, client_name, va.session_id, options, status);
if (res < 0) {
delete client;
JackLibGlobals::Destroy(); // jack library destruction
......
......@@ -67,7 +67,7 @@ JackLibClient::~JackLibClient()
delete fChannel;
}
int JackLibClient::Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid)
int JackLibClient::Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status)
{
int shared_engine, shared_client, shared_graph, result;
jack_log("JackLibClient::Open name = %s", name);
......
......@@ -44,7 +44,7 @@ class JackLibClient : public JackClient
JackLibClient(JackSynchro* table);
virtual ~JackLibClient();
int Open(const char* server_name, const char* name, jack_options_t options, jack_status_t* status, int uuid);
int Open(const char* server_name, const char* name, int uuid, jack_options_t options, jack_status_t* status);
int ClientNotifyImp(int refnum, const char* name, int notify, int sync, const char* message, int value1, int value2);
......
......@@ -136,25 +136,25 @@ int JackServer::Close()
return 0;
}
int JackServer::InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int* status, int uuid)
int JackServer::InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int uuid, int* status)
{
JackLoadableInternalClient* client = new JackLoadableInternalClient1(JackServerGlobals::fInstance, GetSynchroTable(), objet_data);
assert(client);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, status, uuid);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, uuid, status);
}
int JackServer::InternalClientLoad(const char* client_name, const char* so_name, const JSList * parameters, int options, int* int_ref, int* status, int uuid)
int JackServer::InternalClientLoad(const char* client_name, const char* so_name, const JSList * parameters, int options, int* int_ref, int uuid, int* status)
{
JackLoadableInternalClient* client = new JackLoadableInternalClient2(JackServerGlobals::fInstance, GetSynchroTable(), parameters);
assert(client);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, status, uuid);
return InternalClientLoadAux(client, so_name, client_name, options, int_ref, uuid, status);
}
int JackServer::InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int* status, int uuid)
int JackServer::InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int uuid, int* status)
{
// Clear status
*status = 0;
if ((client->Init(so_name) < 0) || (client->Open(JACK_DEFAULT_SERVER_NAME, client_name, (jack_options_t)options, (jack_status_t*)status, uuid) < 0)) {
if ((client->Init(so_name) < 0) || (client->Open(JACK_DEFAULT_SERVER_NAME, client_name, uuid, (jack_options_t)options, (jack_status_t*)status) < 0)) {
delete client;
int my_status1 = *status | JackFailure;
*status = (jack_status_t)my_status1;
......
......@@ -58,7 +58,7 @@ class SERVER_EXPORT JackServer
JackSynchro fSynchroTable[CLIENT_NUM];
bool fFreewheel;
int InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int* status, int uuid);
int InternalClientLoadAux(JackLoadableInternalClient* client, const char* so_name, const char* client_name, int options, int* int_ref, int uuid, int* status);
public:
......@@ -77,8 +77,8 @@ class SERVER_EXPORT JackServer
// Command thread : API
int SetBufferSize(jack_nframes_t buffer_size);
int SetFreewheel(bool onoff);
int InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int* statu, int uuid);
int InternalClientLoad(const char* client_name, const char* so_name, const JSList * parameters, int options, int* int_ref, int* status, int uuid);
int InternalClientLoad(const char* client_name, const char* so_name, const char* objet_data, int options, int* int_ref, int uuid, int* status);
int InternalClientLoad(const char* client_name, const char* so_name, const JSList * parameters, int options, int* int_ref, int uuid, int* status);
void ClientKill(int refnum);
// Transport management
......
......@@ -90,7 +90,7 @@ jack_client_t* jack_client_new_aux(const char* client_name, jack_options_t optio
client = new JackInternalClient(JackServerGlobals::fInstance, GetSynchroTable());
}
int res = client->Open(va.server_name, client_name, options, status, va.session_id);
int res = client->Open(va.server_name, client_name, va.session_id, options, status);
if (res < 0) {
delete client;
JackServerGlobals::Destroy(); // jack server destruction
......@@ -141,7 +141,7 @@ jack_client_t* jack_client_open_aux(const char* client_name, jack_options_t opti
client = new JackInternalClient(JackServerGlobals::fInstance, GetSynchroTable());
}
int res = client->Open(va.server_name, client_name, options, status, va.session_id);
int res = client->Open(va.server_name, client_name, va.session_id, options, status);
if (res < 0) {
delete client;
JackServerGlobals::Destroy(); // jack server destruction
......
......@@ -23,7 +23,6 @@
#include <jack/systemdeps.h>
typedef int32_t jack_shmsize_t;
/**
......
......@@ -335,7 +335,7 @@ void JackSocketClientChannel::InternalClientHandle(int refnum, const char* clien
*status = res.fStatus;
}
void JackSocketClientChannel::InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result, int uuid)
void JackSocketClientChannel::InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int uuid, int* result)
{
JackInternalClientLoadRequest req(refnum, client_name, so_name, objet_data, options, uuid);
JackInternalClientLoadResult res;
......
......@@ -88,7 +88,7 @@ class JackSocketClientChannel : public detail::JackClientChannelInterface, publi
void GetInternalClientName(int refnum, int int_ref, char* name_res, int* result);
void InternalClientHandle(int refnum, const char* client_name, int* status, int* int_ref, int* result);
void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result, int uuid);
void InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int uuid, int* result);
void InternalClientUnload(int refnum, int int_ref, int* status, int* result);
// Session Stuff
......
......@@ -369,7 +369,7 @@ bool JackSocketServerChannel::HandleRequest(int fd)
JackInternalClientLoadRequest req;
JackInternalClientLoadResult res;
if (req.Read(socket) == 0)
res.fResult = fServer->InternalClientLoad(req.fName, req.fDllName, req.fLoadInitName, req.fOptions, &res.fIntRefNum, &res.fStatus, req.fUUID);
res.fResult = fServer->InternalClientLoad(req.fName, req.fDllName, req.fLoadInitName, req.fOptions, &res.fIntRefNum, req.fUUID, &res.fStatus);
if (res.Write(socket) < 0)
jack_error("JackRequest::InternalClientLoad write error name = %s", req.fName);
break;
......
......@@ -151,9 +151,9 @@ void JackWinNamedPipeClientChannel::ClientCheck(const char* name, char* name_res
strcpy(name_res, res.fName);
}
void JackWinNamedPipeClientChannel::ClientOpen(const char* name, int pid, int* shared_engine, int* shared_client, int* shared_graph, int* result)
void JackWinNamedPipeClientChannel::ClientOpen(const char* name, int pid, int uuid, int* shared_engine, int* shared_client, int* shared_graph, int* result)
{
JackClientOpenRequest req(name, pid);
JackClientOpenRequest req(name, pid, uuid);
JackClientOpenResult res;
ServerSyncCall(&req, &res, result);
*shared_engine = res.fSharedEngine;
......@@ -287,9 +287,9 @@ void JackWinNamedPipeClientChannel::InternalClientHandle(int refnum, const char*
*status = res.fStatus;
}
void JackWinNamedPipeClientChannel::InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int* result)
void JackWinNamedPipeClientChannel::InternalClientLoad(int refnum, const char* client_name, const char* so_name, const char* objet_data, int options, int* status, int* int_ref, int uuid, int* result)
{
JackInternalClientLoadRequest req(refnum, client_name, so_name, objet_data, options);
JackInternalClientLoadRequest req(refnum, client_name, so_name, objet_data, options, uuid);
JackInternalClientLoadResult res;
ServerSyncCall(&req, &res, result);
*int_ref = res.fIntRefNum;
......
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