summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1fe8092)
raw | patch | inline | side by side (parent: 1fe8092)
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Wed, 27 Jul 2011 15:26:40 +0000 (17:26 +0200) | ||
committer | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Tue, 9 Aug 2011 20:19:10 +0000 (22:19 +0200) |
src/plugin.c | patch | blob | history | |
src/plugin.h | patch | blob | history | |
src/screen_lyrics.c | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index b575e8c780133cec6aa1db2f43f07fb56c8143c5..f578575781fef6dde6b98999d24c5593ccaa50cc 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
} else {
/* success: invoke the callback */
cycle->callback(cycle->pipe_stdout.data, true,
- cycle->callback_data);
+ cycle->argv[0], cycle->callback_data);
}
}
assert(cycle->pipe_stderr.fd < 0);
assert(cycle->pid < 0);
- cycle->callback(cycle->all_errors, false, cycle->callback_data);
+ cycle->callback(cycle->all_errors, false, NULL, cycle->callback_data);
return FALSE;
}
diff --git a/src/plugin.h b/src/plugin.h
index ebe9b41b7a7db6ab15ec9a26581da769fab4750d..d82fc7387d3486c03ab722b2504c00c84988316a 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
* messages on failure as determined by success
* @param success result of the plugin cycle; true if result is meaningful
* output, false if result contains error messages
+ * @param plugin_name the name of the plugin which succeeded; may become invalid
+ * once the callback returns (i.e. strdup it if you need it afterwards).
* @param data the caller defined pointer passed to plugin_run()
*/
typedef void (*plugin_callback_t)(const GString *result, const bool success,
- void *data);
+ const char *plugin_name, void *data);
/**
* This object represents a cycle through all available plugins, until
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 7f5d47c8f638a0ca40dfdb6702d7f52a514782e3..3dcddbfe5691a5cc07d0cac11d4cfbacee615445 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
static void
screen_lyrics_callback(const GString *result, const bool success,
+ G_GNUC_UNUSED const char *plugin_name,
G_GNUC_UNUSED void *data)
{
assert(current.loader != NULL);