From a476371254eb78071db243f4fb9cecc0c52fabce Mon Sep 17 00:00:00 2001 From: David Henningsson Date: Fri, 25 Apr 2014 17:57:18 +0200 Subject: protocol-native: Enable srbchannel The srbchannel is enabled if protocol version >= 30 and SHM is available. There is also a module parameter srbchannel=false that can be used for disabling the srbchannel. The setup is done in these steps: 1) Server receives authentication (like today) 2) Server sends enable_srbchannel to client 3) Server sends memblock to client 4) Client receives enable_srbchannel 5) Client receives memblock 6) Client sends enable_srbchannel back to server 7) Client switches over 8) Server receives enable_srbchannel and switches over Signed-off-by: David Henningsson --- src/modules/module-protocol-stub.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules/module-protocol-stub.c') diff --git a/src/modules/module-protocol-stub.c b/src/modules/module-protocol-stub.c index 3218a01e1..118351ec4 100644 --- a/src/modules/module-protocol-stub.c +++ b/src/modules/module-protocol-stub.c @@ -120,14 +120,17 @@ # endif # if defined(HAVE_CREDS) && !defined(USE_TCP_SOCKETS) -# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable", +# define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-group", "auth-group-enable", "srbchannel", # define AUTH_USAGE "auth-group= auth-group-enable= " +# define SRB_USAGE "srbchannel= " # elif defined(USE_TCP_SOCKETS) # define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON "auth-ip-acl", # define AUTH_USAGE "auth-ip-acl= " +# define SRB_USAGE # else # define MODULE_ARGUMENTS MODULE_ARGUMENTS_COMMON # define AUTH_USAGE +# define SRB_USAGE # endif PA_MODULE_DESCRIPTION("Native protocol "SOCKET_DESCRIPTION); @@ -135,6 +138,7 @@ "auth-cookie= " "auth-cookie-enabled= " AUTH_USAGE + SRB_USAGE SOCKET_USAGE); #elif defined(USE_PROTOCOL_ESOUND) # include -- cgit v1.2.1