public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-plugins/gkrellmpc/files/
@ 2018-01-13 22:41 David Seifert
  0 siblings, 0 replies; only message in thread
From: David Seifert @ 2018-01-13 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     b5c40d8f0ce46b60bcdaa4bf30f9da9f8abe1d6f
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Jan  6 09:11:45 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 22:40:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5c40d8f

media-plugins/gkrellmpc: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/6770

 .../gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch   | 152 ---------------------
 1 file changed, 152 deletions(-)

diff --git a/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch b/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch
deleted file mode 100644
index 4de5688a2b5..00000000000
--- a/media-plugins/gkrellmpc/files/gkrellmpc-0.1_beta9-mt.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-diff -uNr gkrellmpc-0.1_beta9/gkrellmpc.c gkrellmpc-0.1_beta9.mine/gkrellmpc.c
---- gkrellmpc-0.1_beta9/gkrellmpc.c	2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/gkrellmpc.c	2009-04-05 19:51:12.000000000 +0400
-@@ -132,7 +132,7 @@
- 	/* Create the status decal */
- 	mpc_status_decal = gkrellm_create_decal_pixmap(mpc_panel, gkrellm_decal_misc_pixmap(), gkrellm_decal_misc_mask(), N_MISC_DECALS, style, 0, t);
- 	mpc_status_decal->x = w - mpc_status_decal->w;
--	gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, (mpc_mpd ? D_MISC_LED1 : D_MISC_LED0));
-+	gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, (mpc_mpd_connected() ? D_MISC_LED1 : D_MISC_LED0));
- 
- 	/* Update t */
- 	t += mpc_label_decal->h > mpc_status_decal->h ? mpc_label_decal->h : mpc_status_decal->h;
-@@ -254,7 +254,7 @@
- 	static gint	x_scroll;
- 
- 	/* Try to connect to mpd */
--	if (!mpc_mpd && mpc_ticker->ten_second_tick) {
-+	if (!mpc_mpd_connected() && mpc_ticker->ten_second_tick) {
- 		mpc_mpd_connect();
- 	}
- 
-@@ -428,7 +428,7 @@
- 	status = mpc_mpd_get("status\n");
- 	currentsong = mpc_mpd_get("currentsong\n");
- 
--	if (!mpc_mpd) {
-+	if (!mpc_mpd_connected()) {
- 		mpc_update_label("NO MPD");
- 		mpc_update_songname("");
- 	}
-diff -uNr gkrellmpc-0.1_beta9/mpd.c gkrellmpc-0.1_beta9.mine/mpd.c
---- gkrellmpc-0.1_beta9/mpd.c	2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/mpd.c	2009-04-05 20:30:38.000000000 +0400
-@@ -12,18 +12,32 @@
- #include <sys/socket.h>
- #include <netdb.h>
- 
-+#include <errno.h>
-+#include <pthread.h>
-+
- GIOChannel   * mpc_mpd = NULL;
-+pthread_mutex_t mpc_mutex = { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } }; //PTHREAD_MUTEX_INITIALIZER;
-+
-+gboolean mpc_mpd_connected() {
-+	if(pthread_mutex_trylock(&mpc_mutex)){
-+		return (FALSE);
-+	}
-+	pthread_mutex_unlock(&mpc_mutex);
-+	return (gboolean)mpc_mpd;
-+}
- 
- /*
-  * Connects to the MPD server, sets up the mpd object, sets the status decal to ON
-  */
--gboolean mpc_mpd_connect() {
-+void* mpc_mpd_connect_worker(void* arg) {
- 	int sockfd;
- 	struct hostent *server;
- 	struct sockaddr_in serv_addr;
- 	gchar * line;
- 	gchar ** parts;
- 	gboolean retval;
-+	
-+	pthread_mutex_lock(&mpc_mutex);
- 
- 	if (mpc_mpd) {
- 		/*
-@@ -33,11 +47,11 @@
- 	}
- 
- 	if (!mpc_conf_hostname || !mpc_conf_port) {
--		return (FALSE);
-+		goto err;
- 	}
- 
--	if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) return(FALSE);
--	if (!(server = gethostbyname(mpc_conf_hostname))) return(FALSE);
-+	if ((sockfd = socket(PF_INET, SOCK_STREAM, 0)) == -1) goto err;
-+	if (!(server = gethostbyname(mpc_conf_hostname))) goto err;
- 
- 	bzero((char *) &serv_addr, sizeof(serv_addr));
- 	serv_addr.sin_family = AF_INET;
-@@ -46,7 +60,7 @@
- 			server->h_length);
- 	serv_addr.sin_port = htons(mpc_conf_port);
- 
--	if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) return(FALSE);
-+	if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) goto err;
- 	
- 	/* Getup the mpd object */
- 	mpc_mpd = g_io_channel_unix_new(sockfd);
-@@ -72,29 +86,40 @@
- 		retval = FALSE;
- 	}
- 
--	if (retval) {
--		gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, D_MISC_LED1);
--		mpc_update_label("MPD");
--		mpc_update_songname("");
--	}
- 
--	return(retval);
-+err:	
-+	pthread_mutex_unlock(&mpc_mutex);
-+	return NULL;
-+}
-+
-+gboolean mpc_mpd_connect() {
-+	pthread_attr_t attr;
-+	pthread_t thread_id;
-+	
-+	if(pthread_mutex_trylock(&mpc_mutex)){
-+		return (FALSE);
-+	}
-+	
-+	pthread_attr_init(&attr);
-+	pthread_create(&thread_id, &attr, mpc_mpd_connect_worker, NULL);
-+	
-+	pthread_mutex_unlock(&mpc_mutex);
-+	
-+	return (FALSE);
- }
- 
- /*
-  * Disconnects from MPD, destroys the mpd object, sets the status decal to off
-  */
- gboolean mpc_mpd_disconnect() {
--
-+	pthread_mutex_lock(&mpc_mutex);
- 	if (mpc_mpd) {
- 		g_io_channel_shutdown(mpc_mpd, FALSE, NULL);
- 		free(mpc_mpd);
- 		mpc_mpd = NULL;
- 	}
- 	
--	gkrellm_draw_decal_pixmap(mpc_panel, mpc_status_decal, D_MISC_LED0);
--	mpc_update_label("NO MPD");
--	mpc_update_songname("");
-+	pthread_mutex_unlock(&mpc_mutex);
- 	return (TRUE);
- }
- 
-diff -uNr gkrellmpc-0.1_beta9/mpd.h gkrellmpc-0.1_beta9.mine/mpd.h
---- gkrellmpc-0.1_beta9/mpd.h	2005-01-05 22:33:16.000000000 +0300
-+++ gkrellmpc-0.1_beta9.mine/mpd.h	2009-04-05 19:51:25.000000000 +0400
-@@ -10,5 +10,6 @@
- gboolean     mpc_mpd_do(gchar *);
- GHashTable * mpc_mpd_get(gchar *);
- GPtrArray  * mpc_mpd_get_clumps(gchar *, gboolean);
-+gboolean     mpc_mpd_connected();
- 
- #endif


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-13 22:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-13 22:41 [gentoo-commits] repo/gentoo:master commit in: media-plugins/gkrellmpc/files/ David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox