diff --git a/src/plugin.c b/src/plugin.c
index d7849009887ae92e9c1fba785376a2b465e6b098..f578575781fef6dde6b98999d24c5593ccaa50cc 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
* This program is free software; you can redistribute it and/or modify
} 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;
}
/* reserve space for the program name */
*ret++ = NULL;
- do {
+ while (*args != NULL)
*ret++ = g_strdup(*args++);
- } while (*args != NULL);
/* end of argument vector */
*ret++ = NULL;