git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1539 0c269be4-1314-0410-8aa9-9f06e86f4224tags/0.65
@@ -2,6 +2,10 @@ | |||||
Jackdmp changes log | Jackdmp changes log | ||||
--------------------------- | --------------------------- | ||||
2007-08-27 Stephane Letz <letz@grame.fr> | |||||
* Server/library protocol checking implementation. | |||||
2007-08-26 Stephane Letz <letz@grame.fr> | 2007-08-26 Stephane Letz <letz@grame.fr> | ||||
* Make "Rename" a method of JackPort class, call it from driver Attach method. | * Make "Rename" a method of JackPort class, call it from driver Attach method. | ||||
@@ -72,7 +72,7 @@ class JackClientChannelInterface | |||||
return -1; | return -1; | ||||
} | } | ||||
virtual void ClientCheck(const char* name, char* name_res, int options, int* status, int* result) | |||||
virtual void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{} | {} | ||||
virtual void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result) | virtual void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result) | ||||
{} | {} | ||||
@@ -60,3 +60,5 @@ | |||||
#define jack_client_entry "jack_client" | #define jack_client_entry "jack_client" | ||||
#define ALL_CLIENTS -1 // for notification | #define ALL_CLIENTS -1 // for notification | ||||
#define JACK_PROTOCOL_VERSION 1 |
@@ -377,10 +377,16 @@ void JackEngine::NotifyActivate(int refnum) | |||||
// Client management | // Client management | ||||
//------------------- | //------------------- | ||||
int JackEngine::ClientCheck(const char* name, char* name_res, int options, int* status) | |||||
int JackEngine::ClientCheck(const char* name, char* name_res, int protocol, int options, int* status) | |||||
{ | { | ||||
strcpy(name_res, name); | strcpy(name_res, name); | ||||
if (protocol != JACK_PROTOCOL_VERSION) { | |||||
*status |= (JackFailure|JackVersionError); | |||||
jack_error ("JACK protocol mismatch (%d vs %d)", protocol, JACK_PROTOCOL_VERSION); | |||||
return -1; | |||||
} | |||||
if (ClientCheckName(name)) { | if (ClientCheckName(name)) { | ||||
*status |= JackNameNotUnique; | *status |= JackNameNotUnique; | ||||
@@ -81,7 +81,7 @@ class JackEngine | |||||
// Client management | // Client management | ||||
int ClientCheck(const char* name, char* name_res, int options, int* status); | |||||
int ClientCheck(const char* name, char* name_res, int protocol, int options, int* status); | |||||
int ClientExternalOpen(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager); | int ClientExternalOpen(const char* name, int* ref, int* shared_engine, int* shared_client, int* shared_graph_manager); | ||||
int ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client); | int ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client); | ||||
@@ -71,9 +71,13 @@ int JackInternalClient::Open(const char* name, jack_options_t options, jack_stat | |||||
char name_res[JACK_CLIENT_NAME_SIZE]; | char name_res[JACK_CLIENT_NAME_SIZE]; | ||||
JackLog("JackInternalClient::Open name = %s\n", name); | JackLog("JackInternalClient::Open name = %s\n", name); | ||||
fChannel->ClientCheck(name, name_res, (int)options, (int*)status, &result); | |||||
fChannel->ClientCheck(name, name_res, JACK_PROTOCOL_VERSION, (int)options, (int*)status, &result); | |||||
if (result < 0) { | if (result < 0) { | ||||
jack_error("Client name = %s conflits with another running client", name); | |||||
int status1 = *status; | |||||
if (status1 & JackVersionError) | |||||
jack_error("JACK protocol mismatch %d", JACK_PROTOCOL_VERSION); | |||||
else | |||||
jack_error("Client name = %s conflits with another running client", name); | |||||
goto error; | goto error; | ||||
} | } | ||||
@@ -50,9 +50,9 @@ class JackInternalClientChannel : public JackClientChannelInterface | |||||
return 0; | return 0; | ||||
} | } | ||||
void ClientCheck(const char* name, char* name_res, int options, int* status, int* result) | |||||
void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
*result = fEngine->ClientCheck(name, name_res, options, status); | |||||
*result = fEngine->ClientCheck(name, name_res, protocol, options, status); | |||||
} | } | ||||
void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result) | void ClientOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client, int* result) | ||||
{ | { | ||||
@@ -104,6 +104,8 @@ static jack_client_t* jack_client_open_aux(const char* client_name, jack_options | |||||
if (res < 0) { | if (res < 0) { | ||||
delete client; | delete client; | ||||
JackLibGlobals::Destroy(); // jack library destruction | JackLibGlobals::Destroy(); // jack library destruction | ||||
int my_status1 = (JackFailure|JackServerError); | |||||
*status = (jack_status_t)my_status1; | |||||
return NULL; | return NULL; | ||||
} else { | } else { | ||||
return (jack_client_t*)client; | return (jack_client_t*)client; | ||||
@@ -124,11 +124,12 @@ struct JackClientCheckRequest : public JackRequest | |||||
{ | { | ||||
char fName[JACK_CLIENT_NAME_SIZE + 1]; | char fName[JACK_CLIENT_NAME_SIZE + 1]; | ||||
int fProtocol; | |||||
int fOptions; | int fOptions; | ||||
JackClientCheckRequest() | JackClientCheckRequest() | ||||
{} | {} | ||||
JackClientCheckRequest(const char* name, int options): JackRequest(JackRequest::kClientCheck),fOptions(options) | |||||
JackClientCheckRequest(const char* name,int protocol, int options): JackRequest(JackRequest::kClientCheck),fProtocol(protocol),fOptions(options) | |||||
{ | { | ||||
snprintf(fName, sizeof(fName), "%s", name); | snprintf(fName, sizeof(fName), "%s", name); | ||||
} | } | ||||
@@ -136,6 +137,7 @@ struct JackClientCheckRequest : public JackRequest | |||||
int Read(JackChannelTransaction* trans) | int Read(JackChannelTransaction* trans) | ||||
{ | { | ||||
CheckRes(trans->Read(&fName, JACK_CLIENT_NAME_SIZE + 1)); | CheckRes(trans->Read(&fName, JACK_CLIENT_NAME_SIZE + 1)); | ||||
CheckRes(trans->Read(&fProtocol, sizeof(int))); | |||||
return trans->Read(&fOptions, sizeof(int)); | return trans->Read(&fOptions, sizeof(int)); | ||||
} | } | ||||
@@ -143,6 +145,7 @@ struct JackClientCheckRequest : public JackRequest | |||||
{ | { | ||||
CheckRes(JackRequest::Write(trans)); | CheckRes(JackRequest::Write(trans)); | ||||
CheckRes(trans->Write(&fName, JACK_CLIENT_NAME_SIZE + 1)); | CheckRes(trans->Write(&fName, JACK_CLIENT_NAME_SIZE + 1)); | ||||
CheckRes(trans->Write(&fProtocol, sizeof(int))); | |||||
return trans->Write(&fOptions, sizeof(int)); | return trans->Write(&fOptions, sizeof(int)); | ||||
} | } | ||||
}; | }; | ||||
@@ -159,6 +159,8 @@ EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t o | |||||
if (res < 0) { | if (res < 0) { | ||||
delete client; | delete client; | ||||
JackServerGlobals::Destroy(); // jack server destruction | JackServerGlobals::Destroy(); // jack server destruction | ||||
int my_status1 = (JackFailure|JackServerError); | |||||
*status = (jack_status_t)my_status1; | |||||
return NULL; | return NULL; | ||||
} else { | } else { | ||||
return (jack_client_t*)client; | return (jack_client_t*)client; | ||||
@@ -63,9 +63,13 @@ int JackSocketClientChannel::Open(const char* name, char* name_res, JackClient* | |||||
} | } | ||||
// Check name in server | // Check name in server | ||||
ClientCheck(name, name_res, (int)options, (int*)status, &result); | |||||
ClientCheck(name, name_res, JACK_PROTOCOL_VERSION, (int)options, (int*)status, &result); | |||||
if (result < 0) { | if (result < 0) { | ||||
jack_error("Client name = %s conflits with another running client", name); | |||||
int status1 = *status; | |||||
if (status1 & JackVersionError) | |||||
jack_error("JACK protocol mismatch %d", JACK_PROTOCOL_VERSION); | |||||
else | |||||
jack_error("Client name = %s conflits with another running client", name); | |||||
goto error; | goto error; | ||||
} | } | ||||
@@ -135,9 +139,9 @@ void JackSocketClientChannel::ServerAsyncCall(JackRequest* req, JackResult* res, | |||||
} | } | ||||
} | } | ||||
void JackSocketClientChannel::ClientCheck(const char* name, char* name_res, int options, int* status, int* result) | |||||
void JackSocketClientChannel::ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
JackClientCheckRequest req(name, options); | |||||
JackClientCheckRequest req(name, protocol, options); | |||||
JackClientCheckResult res; | JackClientCheckResult res; | ||||
ServerSyncCall(&req, &res, result); | ServerSyncCall(&req, &res, result); | ||||
*status = res.fStatus; | *status = res.fStatus; | ||||
@@ -59,7 +59,7 @@ class JackSocketClientChannel : public JackClientChannelInterface, public JackRu | |||||
int ServerCheck(const char* server_name); | int ServerCheck(const char* server_name); | ||||
void ClientCheck(const char* name, char* name_res, int options, int* status, int* result); | |||||
void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result); | |||||
void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | ||||
void ClientClose(int refnum, int* result); | void ClientClose(int refnum, int* result); | ||||
@@ -156,7 +156,7 @@ int JackSocketServerChannel::HandleRequest(int fd) | |||||
JackClientCheckRequest req; | JackClientCheckRequest req; | ||||
JackClientCheckResult res; | JackClientCheckResult res; | ||||
if (req.Read(socket) == 0) | if (req.Read(socket) == 0) | ||||
res.fResult = fServer->GetEngine()->ClientCheck(req.fName, res.fName, req.fOptions, &res.fStatus); | |||||
res.fResult = fServer->GetEngine()->ClientCheck(req.fName, res.fName, req.fProtocol, req.fOptions, &res.fStatus); | |||||
res.Write(socket); | res.Write(socket); | ||||
break; | break; | ||||
} | } | ||||
@@ -31,12 +31,12 @@ using namespace Jack; | |||||
#define rpc_type kern_return_t // for astyle | #define rpc_type kern_return_t // for astyle | ||||
rpc_type server_rpc_jack_client_check(mach_port_t private_port, client_name_t name, client_name_t name_res, int options, int* status, int* result) | |||||
rpc_type server_rpc_jack_client_check(mach_port_t private_port, client_name_t name, client_name_t name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
JackLog("rpc_jack_client_check\n"); | JackLog("rpc_jack_client_check\n"); | ||||
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port]; | ||||
assert(channel); | assert(channel); | ||||
channel->ClientCheck((char*)name, (char*)name_res, options, status, result); | |||||
channel->ClientCheck((char*)name, (char*)name_res, protocol, options, status, result); | |||||
return KERN_SUCCESS; | return KERN_SUCCESS; | ||||
} | } | ||||
@@ -66,9 +66,13 @@ int JackMachClientChannel::Open(const char* name, char* name_res, JackClient* cl | |||||
// Check name in server | // Check name in server | ||||
int result = 0; | int result = 0; | ||||
ClientCheck(name, name_res, (int)options, (int*)status, &result); | |||||
ClientCheck(name, name_res, JACK_PROTOCOL_VERSION, (int)options, (int*)status, &result); | |||||
if (result < 0) { | if (result < 0) { | ||||
jack_error("Client name = %s conflits with another running client", name); | |||||
int status1 = *status; | |||||
if (status1 & JackVersionError) | |||||
jack_error("JACK protocol mismatch %d", JACK_PROTOCOL_VERSION); | |||||
else | |||||
jack_error("Client name = %s conflits with another running client", name); | |||||
return -1; | return -1; | ||||
} | } | ||||
@@ -116,9 +120,9 @@ void JackMachClientChannel::Stop() | |||||
fThread->Kill(); | fThread->Kill(); | ||||
} | } | ||||
void JackMachClientChannel::ClientCheck(const char* name, char* name_res, int options, int* status, int* result) | |||||
void JackMachClientChannel::ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
kern_return_t res = rpc_jack_client_check(fServerPort.GetPort(), (char*)name, name_res, options, status, result); | |||||
kern_return_t res = rpc_jack_client_check(fServerPort.GetPort(), (char*)name, name_res, protocol, options, status, result); | |||||
if (res != KERN_SUCCESS) { | if (res != KERN_SUCCESS) { | ||||
*result = -1; | *result = -1; | ||||
jack_error("JackMachClientChannel::ClientCheck err = %s", mach_error_string(res)); | jack_error("JackMachClientChannel::ClientCheck err = %s", mach_error_string(res)); | ||||
@@ -56,7 +56,7 @@ class JackMachClientChannel : public JackClientChannelInterface, public JackRunn | |||||
int ServerCheck(const char* server_name); | int ServerCheck(const char* server_name); | ||||
void ClientCheck(const char* name, char* name_res, int options, int* status, int* result); | |||||
void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result); | |||||
void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | ||||
void ClientClose(int refnum, int* result); | void ClientClose(int refnum, int* result); | ||||
@@ -78,9 +78,9 @@ JackServer* JackMachServerChannel::GetServer() | |||||
return fServer; | return fServer; | ||||
} | } | ||||
void JackMachServerChannel::ClientCheck(char* name, char* name_res, int options, int* status, int* result) | |||||
void JackMachServerChannel::ClientCheck(char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
*result = GetEngine()->ClientCheck(name, name_res, options, status); | |||||
*result = GetEngine()->ClientCheck(name, name_res, protocol, options, status); | |||||
} | } | ||||
void JackMachServerChannel::ClientOpen(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_graph, int* result) | void JackMachServerChannel::ClientOpen(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_graph, int* result) | ||||
@@ -58,7 +58,7 @@ class JackMachServerChannel : public JackServerChannelInterface, public JackRunn | |||||
JackEngine* GetEngine(); | JackEngine* GetEngine(); | ||||
JackServer* GetServer(); | JackServer* GetServer(); | ||||
void ClientCheck(char* name, char* name_res, int options, int* status, int* result); | |||||
void ClientCheck(char* name, char* name_res, int protocol, int options, int* status, int* result); | |||||
void ClientOpen(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_graph, int* result); | void ClientOpen(char* name, mach_port_t* private_port, int* shared_engine, int* shared_client, int* shared_graph, int* result); | ||||
void ClientClose(mach_port_t private_port, int refnum); | void ClientClose(mach_port_t private_port, int refnum); | ||||
void ClientKill(mach_port_t private_port); | void ClientKill(mach_port_t private_port); | ||||
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* IDENTIFICATION: | * IDENTIFICATION: | ||||
* stub generated Wed Aug 15 17:00:32 2007 | |||||
* stub generated Mon Aug 27 17:58:23 2007 | |||||
* with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | * with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | ||||
* OPTIONS: | * OPTIONS: | ||||
*/ | */ | ||||
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* IDENTIFICATION: | * IDENTIFICATION: | ||||
* stub generated Wed Aug 15 17:00:32 2007 | |||||
* stub generated Mon Aug 27 17:58:23 2007 | |||||
* with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | * with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | ||||
* OPTIONS: | * OPTIONS: | ||||
*/ | */ | ||||
@@ -41,6 +41,7 @@ routine rpc_jack_client_check( | |||||
server_port : mach_port_t; | server_port : mach_port_t; | ||||
client_name : client_name_t; | client_name : client_name_t; | ||||
out client_name_res : client_name_t; | out client_name_res : client_name_t; | ||||
protocol : int; | |||||
options : int; | options : int; | ||||
out status : int; | out status : int; | ||||
out result : int); | out result : int); | ||||
@@ -71,6 +71,7 @@ kern_return_t rpc_jack_client_check | |||||
mach_port_t server_port, | mach_port_t server_port, | ||||
client_name_t client_name, | client_name_t client_name, | ||||
client_name_t client_name_res, | client_name_t client_name_res, | ||||
int protocol, | |||||
int options, | int options, | ||||
int *status, | int *status, | ||||
int *result | int *result | ||||
@@ -311,6 +312,7 @@ __END_DECLS | |||||
mach_msg_header_t Head; | mach_msg_header_t Head; | ||||
NDR_record_t NDR; | NDR_record_t NDR; | ||||
client_name_t client_name; | client_name_t client_name; | ||||
int protocol; | |||||
int options; | int options; | ||||
} __Request__rpc_jack_client_check_t; | } __Request__rpc_jack_client_check_t; | ||||
#ifdef __MigPackStructs | #ifdef __MigPackStructs | ||||
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* IDENTIFICATION: | * IDENTIFICATION: | ||||
* stub generated Wed Aug 15 17:00:32 2007 | |||||
* stub generated Mon Aug 27 17:58:23 2007 | |||||
* with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | * with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | ||||
* OPTIONS: | * OPTIONS: | ||||
*/ | */ | ||||
@@ -123,6 +123,7 @@ | |||||
mach_msg_header_t Head; | mach_msg_header_t Head; | ||||
NDR_record_t NDR; | NDR_record_t NDR; | ||||
client_name_t client_name; | client_name_t client_name; | ||||
int protocol; | |||||
int options; | int options; | ||||
} __Request__rpc_jack_client_check_t; | } __Request__rpc_jack_client_check_t; | ||||
#ifdef __MigPackStructs | #ifdef __MigPackStructs | ||||
@@ -834,6 +835,26 @@ mig_internal novalue _Xrpc_jack_client_open | |||||
#endif /* defined(__NDR_convert__*__defined) */ | #endif /* defined(__NDR_convert__*__defined) */ | ||||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined) | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__int_rep__JackRPCEngine__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__int_rep__int__defined) | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__int_rep__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__int_rep__JackRPCEngine__int32_t__defined) | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__int_rep__JackRPCEngine__int32_t((int32_t *)(a), f) | |||||
#elif defined(__NDR_convert__int_rep__int32_t__defined) | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__int_rep__int32_t((int32_t *)(a), f) | |||||
#endif /* defined(__NDR_convert__*__defined) */ | |||||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#ifndef __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined | #ifndef __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined | ||||
#if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined) | #if defined(__NDR_convert__int_rep__JackRPCEngine__int__defined) | ||||
#define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined | #define __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined | ||||
@@ -874,6 +895,26 @@ mig_internal novalue _Xrpc_jack_client_open | |||||
#endif /* defined(__NDR_convert__*__defined) */ | #endif /* defined(__NDR_convert__*__defined) */ | ||||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined) | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__char_rep__JackRPCEngine__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__char_rep__int__defined) | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__char_rep__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__char_rep__JackRPCEngine__int32_t__defined) | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__char_rep__JackRPCEngine__int32_t((int32_t *)(a), f) | |||||
#elif defined(__NDR_convert__char_rep__int32_t__defined) | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__char_rep__int32_t((int32_t *)(a), f) | |||||
#endif /* defined(__NDR_convert__*__defined) */ | |||||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#ifndef __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined | #ifndef __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined | ||||
#if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined) | #if defined(__NDR_convert__char_rep__JackRPCEngine__int__defined) | ||||
#define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined | #define __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined | ||||
@@ -914,6 +955,26 @@ mig_internal novalue _Xrpc_jack_client_open | |||||
#endif /* defined(__NDR_convert__*__defined) */ | #endif /* defined(__NDR_convert__*__defined) */ | ||||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined) | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__float_rep__JackRPCEngine__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__float_rep__int__defined) | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__float_rep__int((int *)(a), f) | |||||
#elif defined(__NDR_convert__float_rep__JackRPCEngine__int32_t__defined) | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__float_rep__JackRPCEngine__int32_t((int32_t *)(a), f) | |||||
#elif defined(__NDR_convert__float_rep__int32_t__defined) | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined | |||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol(a, f) \ | |||||
__NDR_convert__float_rep__int32_t((int32_t *)(a), f) | |||||
#endif /* defined(__NDR_convert__*__defined) */ | |||||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#ifndef __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined | #ifndef __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined | ||||
#if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined) | #if defined(__NDR_convert__float_rep__JackRPCEngine__int__defined) | ||||
#define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined | #define __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined | ||||
@@ -946,11 +1007,15 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__Reque | |||||
#endif /* __MigTypeCheck */ | #endif /* __MigTypeCheck */ | ||||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | #if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | ||||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined) || \ | |||||
defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined) | defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
if (In0P->NDR.int_rep != NDR_record.int_rep) { | if (In0P->NDR.int_rep != NDR_record.int_rep) { | ||||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined) | #if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined) | ||||
__NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.int_rep); | __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.int_rep); | ||||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined) | |||||
__NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol(&In0P->protocol, In0P->NDR.int_rep); | |||||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined) | #if defined(__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
__NDR_convert__int_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.int_rep); | __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.int_rep); | ||||
#endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined */ | #endif /* __NDR_convert__int_rep__Request__rpc_jack_client_check_t__options__defined */ | ||||
@@ -958,11 +1023,15 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__Reque | |||||
#endif /* defined(__NDR_convert__int_rep...) */ | #endif /* defined(__NDR_convert__int_rep...) */ | ||||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | #if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | ||||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined) || \ | |||||
defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined) | defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
if (In0P->NDR.char_rep != NDR_record.char_rep) { | if (In0P->NDR.char_rep != NDR_record.char_rep) { | ||||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined) | #if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined) | ||||
__NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.char_rep); | __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.char_rep); | ||||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined) | |||||
__NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol(&In0P->protocol, In0P->NDR.char_rep); | |||||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined) | #if defined(__NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
__NDR_convert__char_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.char_rep); | __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.char_rep); | ||||
#endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined */ | #endif /* __NDR_convert__char_rep__Request__rpc_jack_client_check_t__options__defined */ | ||||
@@ -970,11 +1039,15 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__Reque | |||||
#endif /* defined(__NDR_convert__char_rep...) */ | #endif /* defined(__NDR_convert__char_rep...) */ | ||||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | #if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined) || \ | ||||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined) || \ | |||||
defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined) | defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
if (In0P->NDR.float_rep != NDR_record.float_rep) { | if (In0P->NDR.float_rep != NDR_record.float_rep) { | ||||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined) | #if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined) | ||||
__NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.float_rep); | __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name(&In0P->client_name, In0P->NDR.float_rep); | ||||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined */ | #endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__client_name__defined */ | ||||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined) | |||||
__NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol(&In0P->protocol, In0P->NDR.float_rep); | |||||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__protocol__defined */ | |||||
#if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined) | #if defined(__NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined) | ||||
__NDR_convert__float_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.float_rep); | __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options(&In0P->options, In0P->NDR.float_rep); | ||||
#endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined */ | #endif /* __NDR_convert__float_rep__Request__rpc_jack_client_check_t__options__defined */ | ||||
@@ -999,6 +1072,7 @@ kern_return_t server_rpc_jack_client_check | |||||
mach_port_t server_port, | mach_port_t server_port, | ||||
client_name_t client_name, | client_name_t client_name, | ||||
client_name_t client_name_res, | client_name_t client_name_res, | ||||
int protocol, | |||||
int options, | int options, | ||||
int *status, | int *status, | ||||
int *result | int *result | ||||
@@ -1016,6 +1090,7 @@ mig_internal novalue _Xrpc_jack_client_check | |||||
mach_msg_header_t Head; | mach_msg_header_t Head; | ||||
NDR_record_t NDR; | NDR_record_t NDR; | ||||
client_name_t client_name; | client_name_t client_name; | ||||
int protocol; | |||||
int options; | int options; | ||||
mach_msg_trailer_t trailer; | mach_msg_trailer_t trailer; | ||||
} Request; | } Request; | ||||
@@ -1048,7 +1123,7 @@ mig_internal novalue _Xrpc_jack_client_check | |||||
{ MIG_RETURN_ERROR(OutP, check_result); } | { MIG_RETURN_ERROR(OutP, check_result); } | ||||
#endif /* defined(__MIG_check__Request__rpc_jack_client_check_t__defined) */ | #endif /* defined(__MIG_check__Request__rpc_jack_client_check_t__defined) */ | ||||
OutP->RetCode = server_rpc_jack_client_check(In0P->Head.msgh_request_port, In0P->client_name, OutP->client_name_res, In0P->options, &OutP->status, &OutP->result); | |||||
OutP->RetCode = server_rpc_jack_client_check(In0P->Head.msgh_request_port, In0P->client_name, OutP->client_name_res, In0P->protocol, In0P->options, &OutP->status, &OutP->result); | |||||
if (OutP->RetCode != KERN_SUCCESS) { | if (OutP->RetCode != KERN_SUCCESS) { | ||||
MIG_RETURN_ERROR(OutP, OutP->RetCode); | MIG_RETURN_ERROR(OutP, OutP->RetCode); | ||||
} | } | ||||
@@ -4626,7 +4701,7 @@ const struct server_JackRPCEngine_subsystem { | |||||
{ (mig_impl_routine_t) 0, | { (mig_impl_routine_t) 0, | ||||
(mig_stub_routine_t) _Xrpc_jack_client_open, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_open_t)}, | (mig_stub_routine_t) _Xrpc_jack_client_open, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_open_t)}, | ||||
{ (mig_impl_routine_t) 0, | { (mig_impl_routine_t) 0, | ||||
(mig_stub_routine_t) _Xrpc_jack_client_check, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_check_t)}, | |||||
(mig_stub_routine_t) _Xrpc_jack_client_check, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_check_t)}, | |||||
{ (mig_impl_routine_t) 0, | { (mig_impl_routine_t) 0, | ||||
(mig_stub_routine_t) _Xrpc_jack_client_close, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_close_t)}, | (mig_stub_routine_t) _Xrpc_jack_client_close, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__rpc_jack_client_close_t)}, | ||||
{ (mig_impl_routine_t) 0, | { (mig_impl_routine_t) 0, | ||||
@@ -1,6 +1,6 @@ | |||||
/* | /* | ||||
* IDENTIFICATION: | * IDENTIFICATION: | ||||
* stub generated Wed Aug 15 17:00:32 2007 | |||||
* stub generated Mon Aug 27 17:58:23 2007 | |||||
* with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | * with a MiG generated Mon Sep 11 19:11:05 PDT 2006 by root@b09.apple.com | ||||
* OPTIONS: | * OPTIONS: | ||||
*/ | */ | ||||
@@ -904,6 +904,7 @@ mig_external kern_return_t rpc_jack_client_check | |||||
mach_port_t server_port, | mach_port_t server_port, | ||||
client_name_t client_name, | client_name_t client_name, | ||||
client_name_t client_name_res, | client_name_t client_name_res, | ||||
int protocol, | |||||
int options, | int options, | ||||
int *status, | int *status, | ||||
int *result | int *result | ||||
@@ -918,6 +919,7 @@ mig_external kern_return_t rpc_jack_client_check | |||||
mach_msg_header_t Head; | mach_msg_header_t Head; | ||||
NDR_record_t NDR; | NDR_record_t NDR; | ||||
client_name_t client_name; | client_name_t client_name; | ||||
int protocol; | |||||
int options; | int options; | ||||
} Request; | } Request; | ||||
#ifdef __MigPackStructs | #ifdef __MigPackStructs | ||||
@@ -982,6 +984,8 @@ mig_external kern_return_t rpc_jack_client_check | |||||
(void) mig_strncpy(InP->client_name, client_name, 128); | (void) mig_strncpy(InP->client_name, client_name, 128); | ||||
InP->protocol = protocol; | |||||
InP->options = options; | InP->options = options; | ||||
InP->Head.msgh_bits = | InP->Head.msgh_bits = | ||||
@@ -142,9 +142,9 @@ void JackWinNamedPipeClientChannel::ServerAsyncCall(JackRequest* req, JackResult | |||||
} | } | ||||
} | } | ||||
void JackWinNamedPipeClientChannel::ClientCheck(const char* name, char* name_res, int options, int* status, int* result) | |||||
void JackWinNamedPipeClientChannel::ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result) | |||||
{ | { | ||||
JackClientCheckRequest req(name, options); | |||||
JackClientCheckRequest req(name, protocol, options); | |||||
JackClientCheckResult res; | JackClientCheckResult res; | ||||
ServerSyncCall(&req, &res, result); | ServerSyncCall(&req, &res, result); | ||||
*status = res.fStatus; | *status = res.fStatus; | ||||
@@ -58,7 +58,7 @@ class JackWinNamedPipeClientChannel : public JackClientChannelInterface, public | |||||
int ServerCheck(const char* server_name); | int ServerCheck(const char* server_name); | ||||
void ClientCheck(const char* name, char* name_res, int options, int* status, int* result); | |||||
void ClientCheck(const char* name, char* name_res, int protocol, int options, int* status, int* result); | |||||
void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | void ClientOpen(const char* name, int* shared_engine, int* shared_client, int* shared_graph, int* result); | ||||
void ClientClose(int refnum, int* result); | void ClientClose(int refnum, int* result); | ||||