minor work

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@26 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-06-19 18:51:30 +00:00
parent b4e3f5c5c5
commit 787bf6cb64
2 changed files with 33 additions and 6 deletions

View file

@ -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;
}