Browse Source

Server/library protocol checking implementation.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1539 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.65
sletz 17 years ago
parent
commit
33784c5568
26 changed files with 146 additions and 33 deletions
  1. +4
    -0
      ChangeLog
  2. +1
    -1
      common/JackChannel.h
  3. +2
    -0
      common/JackConstants.h
  4. +7
    -1
      common/JackEngine.cpp
  5. +1
    -1
      common/JackEngine.h
  6. +6
    -2
      common/JackInternalClient.cpp
  7. +2
    -2
      common/JackInternalClientChannel.h
  8. +2
    -0
      common/JackLibAPI.cpp
  9. +4
    -1
      common/JackRequest.h
  10. +2
    -0
      common/JackServerAPI.cpp
  11. +8
    -4
      common/JackSocketClientChannel.cpp
  12. +1
    -1
      common/JackSocketClientChannel.h
  13. +1
    -1
      common/JackSocketServerChannel.cpp
  14. +2
    -2
      macosx/JackMacEngineRPC.cpp
  15. +8
    -4
      macosx/JackMachClientChannel.cpp
  16. +1
    -1
      macosx/JackMachClientChannel.h
  17. +2
    -2
      macosx/JackMachServerChannel.cpp
  18. +1
    -1
      macosx/JackMachServerChannel.h
  19. +1
    -1
      macosx/RPC/JackRPCClientServer.c
  20. +1
    -1
      macosx/RPC/JackRPCClientUser.c
  21. +1
    -0
      macosx/RPC/JackRPCEngine.defs
  22. +2
    -0
      macosx/RPC/JackRPCEngine.h
  23. +78
    -3
      macosx/RPC/JackRPCEngineServer.c
  24. +5
    -1
      macosx/RPC/JackRPCEngineUser.c
  25. +2
    -2
      windows/JackWinNamedPipeClientChannel.cpp
  26. +1
    -1
      windows/JackWinNamedPipeClientChannel.h

+ 4
- 0
ChangeLog View File

@@ -2,6 +2,10 @@
Jackdmp changes log
---------------------------

2007-08-27 Stephane Letz <letz@grame.fr>
* Server/library protocol checking implementation.

2007-08-26 Stephane Letz <letz@grame.fr>
* Make "Rename" a method of JackPort class, call it from driver Attach method.


+ 1
- 1
common/JackChannel.h View File

@@ -72,7 +72,7 @@ class JackClientChannelInterface
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)
{}


+ 2
- 0
common/JackConstants.h View File

@@ -60,3 +60,5 @@
#define jack_client_entry "jack_client"

#define ALL_CLIENTS -1 // for notification

#define JACK_PROTOCOL_VERSION 1

+ 7
- 1
common/JackEngine.cpp View File

@@ -377,10 +377,16 @@ void JackEngine::NotifyActivate(int refnum)
// 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);
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)) {

*status |= JackNameNotUnique;


+ 1
- 1
common/JackEngine.h View File

@@ -81,7 +81,7 @@ class JackEngine

// 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 ClientInternalOpen(const char* name, int* ref, JackEngineControl** shared_engine, JackGraphManager** shared_manager, JackClientInterface* client);



+ 6
- 2
common/JackInternalClient.cpp View File

@@ -71,9 +71,13 @@ int JackInternalClient::Open(const char* name, jack_options_t options, jack_stat
char name_res[JACK_CLIENT_NAME_SIZE];
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) {
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;
}


+ 2
- 2
common/JackInternalClientChannel.h View File

@@ -50,9 +50,9 @@ class JackInternalClientChannel : public JackClientChannelInterface
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)
{


+ 2
- 0
common/JackLibAPI.cpp View File

@@ -104,6 +104,8 @@ static jack_client_t* jack_client_open_aux(const char* client_name, jack_options
if (res < 0) {
delete client;
JackLibGlobals::Destroy(); // jack library destruction
int my_status1 = (JackFailure|JackServerError);
*status = (jack_status_t)my_status1;
return NULL;
} else {
return (jack_client_t*)client;


+ 4
- 1
common/JackRequest.h View File

@@ -124,11 +124,12 @@ struct JackClientCheckRequest : public JackRequest
{

char fName[JACK_CLIENT_NAME_SIZE + 1];
int fProtocol;
int fOptions;

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);
}
@@ -136,6 +137,7 @@ struct JackClientCheckRequest : public JackRequest
int Read(JackChannelTransaction* trans)
{
CheckRes(trans->Read(&fName, JACK_CLIENT_NAME_SIZE + 1));
CheckRes(trans->Read(&fProtocol, sizeof(int)));
return trans->Read(&fOptions, sizeof(int));
}

@@ -143,6 +145,7 @@ struct JackClientCheckRequest : public JackRequest
{
CheckRes(JackRequest::Write(trans));
CheckRes(trans->Write(&fName, JACK_CLIENT_NAME_SIZE + 1));
CheckRes(trans->Write(&fProtocol, sizeof(int)));
return trans->Write(&fOptions, sizeof(int));
}
};


+ 2
- 0
common/JackServerAPI.cpp View File

@@ -159,6 +159,8 @@ EXPORT jack_client_t* jack_client_open(const char* client_name, jack_options_t o
if (res < 0) {
delete client;
JackServerGlobals::Destroy(); // jack server destruction
int my_status1 = (JackFailure|JackServerError);
*status = (jack_status_t)my_status1;
return NULL;
} else {
return (jack_client_t*)client;


+ 8
- 4
common/JackSocketClientChannel.cpp View File

@@ -63,9 +63,13 @@ int JackSocketClientChannel::Open(const char* name, char* name_res, JackClient*
}
// 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) {
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;
}

@@ -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;
ServerSyncCall(&req, &res, result);
*status = res.fStatus;


+ 1
- 1
common/JackSocketClientChannel.h View File

@@ -59,7 +59,7 @@ class JackSocketClientChannel : public JackClientChannelInterface, public JackRu
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 ClientClose(int refnum, int* result);



+ 1
- 1
common/JackSocketServerChannel.cpp View File

@@ -156,7 +156,7 @@ int JackSocketServerChannel::HandleRequest(int fd)
JackClientCheckRequest req;
JackClientCheckResult res;
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);
break;
}


+ 2
- 2
macosx/JackMacEngineRPC.cpp View File

@@ -31,12 +31,12 @@ using namespace Jack;

#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");
JackMachServerChannel* channel = JackMachServerChannel::fPortTable[private_port];
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;
}



+ 8
- 4
macosx/JackMachClientChannel.cpp View File

@@ -66,9 +66,13 @@ int JackMachClientChannel::Open(const char* name, char* name_res, JackClient* cl
// Check name in server
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) {
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;
}

@@ -116,9 +120,9 @@ void JackMachClientChannel::Stop()
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) {
*result = -1;
jack_error("JackMachClientChannel::ClientCheck err = %s", mach_error_string(res));


+ 1
- 1
macosx/JackMachClientChannel.h View File

@@ -56,7 +56,7 @@ class JackMachClientChannel : public JackClientChannelInterface, public JackRunn
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 ClientClose(int refnum, int* result);



+ 2
- 2
macosx/JackMachServerChannel.cpp View File

@@ -78,9 +78,9 @@ JackServer* JackMachServerChannel::GetServer()
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)


+ 1
- 1
macosx/JackMachServerChannel.h View File

@@ -58,7 +58,7 @@ class JackMachServerChannel : public JackServerChannelInterface, public JackRunn
JackEngine* GetEngine();
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 ClientClose(mach_port_t private_port, int refnum);
void ClientKill(mach_port_t private_port);


+ 1
- 1
macosx/RPC/JackRPCClientServer.c View File

@@ -1,6 +1,6 @@
/*
* 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
* OPTIONS:
*/


+ 1
- 1
macosx/RPC/JackRPCClientUser.c View File

@@ -1,6 +1,6 @@
/*
* 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
* OPTIONS:
*/


+ 1
- 0
macosx/RPC/JackRPCEngine.defs View File

@@ -41,6 +41,7 @@ routine rpc_jack_client_check(
server_port : mach_port_t;
client_name : client_name_t;
out client_name_res : client_name_t;
protocol : int;
options : int;
out status : int;
out result : int);


+ 2
- 0
macosx/RPC/JackRPCEngine.h View File

@@ -71,6 +71,7 @@ kern_return_t rpc_jack_client_check
mach_port_t server_port,
client_name_t client_name,
client_name_t client_name_res,
int protocol,
int options,
int *status,
int *result
@@ -311,6 +312,7 @@ __END_DECLS
mach_msg_header_t Head;
NDR_record_t NDR;
client_name_t client_name;
int protocol;
int options;
} __Request__rpc_jack_client_check_t;
#ifdef __MigPackStructs


+ 78
- 3
macosx/RPC/JackRPCEngineServer.c View File

@@ -1,6 +1,6 @@
/*
* 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
* OPTIONS:
*/
@@ -123,6 +123,7 @@
mach_msg_header_t Head;
NDR_record_t NDR;
client_name_t client_name;
int protocol;
int options;
} __Request__rpc_jack_client_check_t;
#ifdef __MigPackStructs
@@ -834,6 +835,26 @@ mig_internal novalue _Xrpc_jack_client_open
#endif /* defined(__NDR_convert__*__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
#if defined(__NDR_convert__int_rep__JackRPCEngine__int__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 /* __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
#if defined(__NDR_convert__char_rep__JackRPCEngine__int__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 /* __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
#if defined(__NDR_convert__float_rep__JackRPCEngine__int__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 */

#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)
if (In0P->NDR.int_rep != NDR_record.int_rep) {
#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);
#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)
__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 */
@@ -958,11 +1023,15 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__Reque
#endif /* defined(__NDR_convert__int_rep...) */

#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)
if (In0P->NDR.char_rep != NDR_record.char_rep) {
#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);
#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)
__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 */
@@ -970,11 +1039,15 @@ mig_internal kern_return_t __MIG_check__Request__rpc_jack_client_check_t(__Reque
#endif /* defined(__NDR_convert__char_rep...) */

#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)
if (In0P->NDR.float_rep != NDR_record.float_rep) {
#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);
#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)
__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 */
@@ -999,6 +1072,7 @@ kern_return_t server_rpc_jack_client_check
mach_port_t server_port,
client_name_t client_name,
client_name_t client_name_res,
int protocol,
int options,
int *status,
int *result
@@ -1016,6 +1090,7 @@ mig_internal novalue _Xrpc_jack_client_check
mach_msg_header_t Head;
NDR_record_t NDR;
client_name_t client_name;
int protocol;
int options;
mach_msg_trailer_t trailer;
} Request;
@@ -1048,7 +1123,7 @@ mig_internal novalue _Xrpc_jack_client_check
{ MIG_RETURN_ERROR(OutP, check_result); }
#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) {
MIG_RETURN_ERROR(OutP, OutP->RetCode);
}
@@ -4626,7 +4701,7 @@ const struct server_JackRPCEngine_subsystem {
{ (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_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_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,


+ 5
- 1
macosx/RPC/JackRPCEngineUser.c View File

@@ -1,6 +1,6 @@
/*
* 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
* OPTIONS:
*/
@@ -904,6 +904,7 @@ mig_external kern_return_t rpc_jack_client_check
mach_port_t server_port,
client_name_t client_name,
client_name_t client_name_res,
int protocol,
int options,
int *status,
int *result
@@ -918,6 +919,7 @@ mig_external kern_return_t rpc_jack_client_check
mach_msg_header_t Head;
NDR_record_t NDR;
client_name_t client_name;
int protocol;
int options;
} Request;
#ifdef __MigPackStructs
@@ -982,6 +984,8 @@ mig_external kern_return_t rpc_jack_client_check

(void) mig_strncpy(InP->client_name, client_name, 128);

InP->protocol = protocol;

InP->options = options;

InP->Head.msgh_bits =


+ 2
- 2
windows/JackWinNamedPipeClientChannel.cpp View File

@@ -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;
ServerSyncCall(&req, &res, result);
*status = res.fStatus;


+ 1
- 1
windows/JackWinNamedPipeClientChannel.h View File

@@ -58,7 +58,7 @@ class JackWinNamedPipeClientChannel : public JackClientChannelInterface, public
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 ClientClose(int refnum, int* result);



Loading…
Cancel
Save