From 787bf6cb64efaa502dfcc8c2631a8d577d591a23 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 19 Jun 2004 18:51:30 +0000 Subject: minor work git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@26 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/module-simple-protocol.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/module-simple-protocol.c') diff --git a/src/module-simple-protocol.c b/src/module-simple-protocol.c index c25ff06a..905594c6 100644 --- a/src/module-simple-protocol.c +++ b/src/module-simple-protocol.c @@ -3,7 +3,19 @@ #include "module.h" #include "socket-server.h" -#include "protocol-simple.h" + +#ifdef USE_PROTOCOL_SIMPLE + #include "protocol-simple.h" + #define protocol_free protcol_simple_free +#else + #ifdef USE_PROTOCOL_CLI + #include "protocol-cli.h" + #define protocol_new protocol_cli_new + #define protocol_free protocol_cli_free + #else + #error "Broken build system" + #endif +#endif int module_init(struct core *c, struct module*m) { struct socket_server *s; @@ -17,7 +29,12 @@ int module_init(struct core *c, struct module*m) { return -1; #endif +#ifdef USE_PROTOCOL_SIMPLE m->userdata = protocol_simple_new(c, s, PROTOCOL_SIMPLE_PLAYBACK); +#else + m->userdata = protocol_new(c, s); +#endif + assert(m->userdata); return 0; } -- cgit