diff options
author | Simon Busch <morphis@gravedo.de> | 2011-10-14 21:14:03 +0200 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2011-10-14 21:14:03 +0200 |
commit | 0de463cd6c5bf0a2610668eb628fe300397f0fa2 (patch) | |
tree | 443bf6be7cc122f83543433a61198fb4c40dc284 /samsung-ipc/ipc.c | |
parent | 3ce2d8a1817efaa5280eeef716356503582553dd (diff) | |
download | hardware_replicant_libsamsung-ipc-0de463cd6c5bf0a2610668eb628fe300397f0fa2.tar.gz hardware_replicant_libsamsung-ipc-0de463cd6c5bf0a2610668eb628fe300397f0fa2.tar.bz2 hardware_replicant_libsamsung-ipc-0de463cd6c5bf0a2610668eb628fe300397f0fa2.zip |
Implement handling of additional arguments in ipc_client_log method
Signed-off-by: Simon Busch <morphis@gravedo.de>
Diffstat (limited to 'samsung-ipc/ipc.c')
-rw-r--r-- | samsung-ipc/ipc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c index 5c3639c..fa4ddea 100644 --- a/samsung-ipc/ipc.c +++ b/samsung-ipc/ipc.c @@ -23,6 +23,7 @@ #include <stdio.h> #include <string.h> #include <assert.h> +#include <stdarg.h> #include <radio.h> @@ -40,8 +41,14 @@ void log_handler_default(const char *message, void *user_data) void ipc_client_log(struct ipc_client *client, const char *message, ...) { assert(client->log_handler != NULL); - // FIXME construct message with additional arguments! - client->log_handler(message, client->log_data); + + va_list args; + char buffer[4096]; + + va_start(args, message); + vsprintf(buffer, message, args); + client->log_handler(buffer, client->log_data); + va_end(args); } struct ipc_client* ipc_client_new(int client_type) |