From slp2009@osfmail.isc.rit.edu Sun Apr 22 04:59:30 2001 Received: from taas.iki.fi (root@taas.iki.fi [212.16.100.1]) by rieska.oulu.fi (8.11.1/8.11.1) with ESMTP id f3M1xUv02269 for ; Sun, 22 Apr 2001 04:59:30 +0300 (EET DST) Received: from filer4.isc.rit.edu (filer4.isc.rit.edu [129.21.2.228]) by taas.iki.fi (8.8.8/8.8.8) with ESMTP id EAA06773 for ; Sun, 22 Apr 2001 04:59:29 +0300 (EEST) Received: from res109a-060.rh.rit.edu ("port 1252"@[129.21.109.60]) by osfmail.rit.edu (PMDF V6.0-24 #36986) with ESMTP id <0GC50067DPLJHR@osfmail.rit.edu> for wwwwolf@iki.fi; Sat, 21 Apr 2001 15:17:43 -0400 (EDT) Date: Sat, 21 Apr 2001 15:17:46 -0400 (EDT) From: Steve Pomeroy Subject: patch for xmms infopipe X-Sender: To: wwwwolf@iki.fi Message-id: MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_drAQxN8XzgzXLOAEisosyw)" Status: RO X-Status: A Content-Length: 2371 Lines: 69 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --Boundary_(ID_drAQxN8XzgzXLOAEisosyw) Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT hey there, I was having some nasty issues with xmms infopipe running on multiple sessions of xmms. when the plugin started on the second instance, it got confused and things got rather unstable after that. so, i figured i'd just toss the xmms instance number after infopipe name. I've included a patch that does just that. You can have it ignore the instance number by changing the #define back to the string literal. the pipe looks like: /tmp/xmms-info.session# -Steve Pomeroy http://xxv.rh.rit.edu/ steve_x@earthling.net --Boundary_(ID_drAQxN8XzgzXLOAEisosyw) Content-id: Content-type: TEXT/PLAIN; charset=US-ASCII; name=xmms-infopipe-1.1-mult-session.diff Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=xmms-infopipe-1.1-mult-session.diff Content-description: diff -Naur xmms-infopipe-1.1/src/infopipe.c xmms-infopipe-1.1-mod/src/infopipe.c --- xmms-infopipe-1.1/src/infopipe.c Sun Feb 11 19:03:40 2001 +++ xmms-infopipe-1.1-mod/src/infopipe.c Sat Apr 21 15:09:40 2001 @@ -76,6 +76,7 @@ The thread that we launch... */ pthread_t pipehandler; +char* fifo_file; /* The function that's called when the plugin is initialized, as specified @@ -84,6 +85,11 @@ pipe requests. */ void init_plugin(void) { + + /* handle multiple session names */ + fifo_file = malloc( 30 ); + sprintf( fifo_file, "%s.%d", FIFO_FILE_PFX, infopipe_gp.xmms_session ); + /* See if the file exists... */ if(access(FIFO_FILE,F_OK)==0) { diff -Naur xmms-infopipe-1.1/src/infopipe.h xmms-infopipe-1.1-mod/src/infopipe.h --- xmms-infopipe-1.1/src/infopipe.h Wed Jan 10 18:41:28 2001 +++ xmms-infopipe-1.1-mod/src/infopipe.h Sat Apr 21 15:09:40 2001 @@ -32,6 +32,7 @@ This should be defined in the configuration dialog, but we don't have one.. yet... */ -#define FIFO_FILE "/tmp/xmms-info" +#define FIFO_FILE fifo_file +#define FIFO_FILE_PFX "/tmp/xmms-info" #endif /* INFOPIPE_PLUGIN_INFOPIPE_H */ --Boundary_(ID_drAQxN8XzgzXLOAEisosyw)--