mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-27 00:58:36 +00:00
xmms more error messages
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@497 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
dfa0ba0598
commit
3dc1345eee
10
src/conky.c
10
src/conky.c
@ -4569,13 +4569,13 @@ void reload_config(void)
|
|||||||
if (info.xmms.thread) {
|
if (info.xmms.thread) {
|
||||||
if (destroy_xmms_thread()!=0)
|
if (destroy_xmms_thread()!=0)
|
||||||
{
|
{
|
||||||
ERR("error destroying xmms thread");
|
ERR("error destroying xmms_player thread");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( (!info.xmms.thread) && (info.xmms.current_project > PROJECT_NONE) &&
|
if ( (!info.xmms.thread) && (info.xmms.current_project > PROJECT_NONE) &&
|
||||||
(create_xmms_thread() !=0) )
|
(create_xmms_thread() !=0) )
|
||||||
{
|
{
|
||||||
CRIT_ERR("unable to create xmms thread!");
|
CRIT_ERR("unable to create xmms_player thread!");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
extract_variable_text(text);
|
extract_variable_text(text);
|
||||||
@ -4634,7 +4634,7 @@ void clean_up(void)
|
|||||||
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
||||||
if ( info.xmms.thread && (destroy_xmms_thread()!=0) )
|
if ( info.xmms.thread && (destroy_xmms_thread()!=0) )
|
||||||
{
|
{
|
||||||
ERR("error destroying xmms thread");
|
ERR("error destroying xmms_player thread");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -5544,7 +5544,7 @@ int main(int argc, char **argv)
|
|||||||
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
||||||
if ( (info.xmms.current_project > PROJECT_NONE) && (create_xmms_thread() !=0) )
|
if ( (info.xmms.current_project > PROJECT_NONE) && (create_xmms_thread() !=0) )
|
||||||
{
|
{
|
||||||
CRIT_ERR("unable to create xmms thread!");
|
CRIT_ERR("unable to create xmms_player thread!");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5553,7 +5553,7 @@ int main(int argc, char **argv)
|
|||||||
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS) || defined(INFOPIPE)
|
||||||
if ( info.xmms.thread && (destroy_xmms_thread()!=0) )
|
if ( info.xmms.thread && (destroy_xmms_thread()!=0) )
|
||||||
{
|
{
|
||||||
ERR("error destroying xmms thread");
|
ERR("error destroying xmms_player thread");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
30
src/xmms.c
30
src/xmms.c
@ -52,7 +52,7 @@ enum _infopipe_keys {
|
|||||||
INFOPIPE_USEC_POSITION,
|
INFOPIPE_USEC_POSITION,
|
||||||
INFOPIPE_POSITION,
|
INFOPIPE_POSITION,
|
||||||
INFOPIPE_USEC_TIME,
|
INFOPIPE_USEC_TIME,
|
||||||
INFOPIPE_TIME,
|
INFOPIPE_TIME,
|
||||||
INFOPIPE_BITRATE,
|
INFOPIPE_BITRATE,
|
||||||
INFOPIPE_FREQUENCY,
|
INFOPIPE_FREQUENCY,
|
||||||
INFOPIPE_CHANNELS,
|
INFOPIPE_CHANNELS,
|
||||||
@ -61,6 +61,14 @@ enum _infopipe_keys {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static char *xmms_project_name[] = {
|
||||||
|
"none",
|
||||||
|
"xmms",
|
||||||
|
"bmp",
|
||||||
|
"audacious",
|
||||||
|
"infopipe"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/* access to this item array is synchronized with mutexes */
|
/* access to this item array is synchronized with mutexes */
|
||||||
static xmms_t g_items;
|
static xmms_t g_items;
|
||||||
@ -90,8 +98,10 @@ void update_xmms(void)
|
|||||||
int create_xmms_thread(void)
|
int create_xmms_thread(void)
|
||||||
{
|
{
|
||||||
/* Was an an available project requested? */
|
/* Was an an available project requested? */
|
||||||
if (!TEST_XMMS_PROJECT_AVAILABLE(info.xmms.project_mask, info.xmms.current_project))
|
if (!TEST_XMMS_PROJECT_AVAILABLE(info.xmms.project_mask, info.xmms.current_project)) {
|
||||||
|
fprintf(stderr, "xmms_player '%s' not configured\n", xmms_project_name[info.xmms.current_project]);
|
||||||
return(-1);
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
/* The project should not be PROJECT_NONE */
|
/* The project should not be PROJECT_NONE */
|
||||||
if (info.xmms.current_project==PROJECT_NONE)
|
if (info.xmms.current_project==PROJECT_NONE)
|
||||||
@ -157,6 +167,16 @@ int destroy_xmms_thread(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS)
|
#if defined(XMMS) || defined(BMP) || defined(AUDACIOUS)
|
||||||
|
void check_dlerror(void)
|
||||||
|
{
|
||||||
|
const char *error;
|
||||||
|
|
||||||
|
if ((error = dlerror()) != NULL) {
|
||||||
|
ERR("error grabbing function symbol");
|
||||||
|
pthread_exit(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------
|
/* ------------------------------------------------------------
|
||||||
* Worker thread function for XMMS/BMP/Audacious data sampling.
|
* Worker thread function for XMMS/BMP/Audacious data sampling.
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
@ -220,10 +240,8 @@ void *xmms_thread_func_dynamic(void *pvoid)
|
|||||||
|
|
||||||
/* Grab the function pointers from the library */
|
/* Grab the function pointers from the library */
|
||||||
xmms_remote_is_running = dlsym(handle, "xmms_remote_is_running");
|
xmms_remote_is_running = dlsym(handle, "xmms_remote_is_running");
|
||||||
if ((error = dlerror()) != NULL) {
|
check_dlerror();
|
||||||
ERR("error grabbing function symbol");
|
|
||||||
pthread_exit(NULL);
|
|
||||||
}
|
|
||||||
xmms_remote_is_paused = dlsym(handle, "xmms_remote_is_paused");
|
xmms_remote_is_paused = dlsym(handle, "xmms_remote_is_paused");
|
||||||
if ((error = dlerror()) != NULL) {
|
if ((error = dlerror()) != NULL) {
|
||||||
ERR("error grabbing function symbol");
|
ERR("error grabbing function symbol");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user