diff --git a/audacious-plugins-2.2-bluetooth.patch b/audacious-plugins-2.2-bluetooth.patch new file mode 100644 index 0000000..3059cf1 --- /dev/null +++ b/audacious-plugins-2.2-bluetooth.patch @@ -0,0 +1,97 @@ +diff -Nur audacious-plugins-2.2-orig/src/bluetooth/bluetooth.c audacious-plugins-2.2-bluetooth/src/bluetooth/bluetooth.c +--- audacious-plugins-2.2-orig/src/bluetooth/bluetooth.c 2009-11-22 23:49:52.000000000 +0100 ++++ audacious-plugins-2.2-bluetooth/src/bluetooth/bluetooth.c 2009-12-19 19:48:34.000000000 +0100 +@@ -29,6 +29,7 @@ + GList * current_device = NULL; + gint config = 0; + gint devices_no = 0; ++gboolean pcmdev_modified = FALSE; + GStaticMutex mutex = G_STATIC_MUTEX_INIT; + static gchar *current_address=NULL; + static GThread *connect_th; +@@ -58,44 +59,53 @@ + + void bluetooth_init ( void ) + { ++ bonded_dev = NULL; ++ discover_finish = 0; ++ pcmdev_modified = FALSE; + audio_devices = NULL; + bus = NULL; + obj = NULL; +- gchar* bonded_addr="zz"; ++ gchar* bonded_addr = NULL; + discover_devices(); + mcs_handle_t *cfgfile ; + cfgfile = aud_cfg_db_open(); + if(!aud_cfg_db_get_string(cfgfile, "BLUETOOTH_PLUGIN", "bonded", +- &bonded_addr)) ++ &bonded_addr)) { ++ aud_cfg_db_close(cfgfile); + return; ++ } + if(bonded_addr!=NULL && g_strcmp0(bonded_addr,"no")!=0) + { + remove_bonding(bonded_addr); + } ++ free(bonded_addr); + aud_cfg_db_close(cfgfile); + + } + + void bluetooth_cleanup ( void ) + { +- printf("bluetooth: exit\n"); + if (config ==1 ) + { + close_window(); + config =0; + } +- remove_bonding(bonded_dev); ++ if (bonded_dev) { ++ printf("bluetooth: exit\n"); ++ remove_bonding(bonded_dev); ++ } + if(discover_finish == 2) { + dbus_g_connection_flush (bus); + dbus_g_connection_unref(bus); + disconnect_dbus_signals(); + + } ++ if (pcmdev_modified) { + /* switching back to default pcm device at cleanup */ + mcs_handle_t *cfgfile = aud_cfg_db_open(); +- aud_cfg_db_set_string(cfgfile,"ALSA","pcm_device", "default"); ++ aud_cfg_db_set_string(cfgfile,"alsa","pcm", "default"); + aud_cfg_db_close(cfgfile); +- ++ } + } + + void bt_about( void ) +@@ -243,8 +253,9 @@ + g_free(device_line); + g_free(file_name); + g_free(temp_file_name); ++ pcmdev_modified = TRUE; + mcs_handle_t *cfgfile = aud_cfg_db_open(); +- aud_cfg_db_set_string(cfgfile,"ALSA","pcm_device", "audacious_bt"); ++ aud_cfg_db_set_string(cfgfile,"alsa","pcm", "audacious_bt"); + aud_cfg_db_close(cfgfile); + + printf("play callback\n"); +@@ -360,12 +371,13 @@ + { + GError *error = NULL; + // g_type_init(); +- g_log_set_always_fatal (G_LOG_LEVEL_WARNING); ++ /* g_log_set_always_fatal (G_LOG_LEVEL_WARNING); */ /* too invasive */ + bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); + if (error != NULL) + { + g_printerr("Connecting to system bus failed: %s\n", error->message); + g_error_free(error); ++ return; + } + obj = dbus_g_proxy_new_for_name(bus, "org.bluez", "/org/bluez/hci0", "org.bluez.Adapter"); + printf("bluetooth plugin - start discovery \n"); diff --git a/audacious-plugins-2.2-cfg_db_close.patch b/audacious-plugins-2.2-cfg_db_close.patch new file mode 100644 index 0000000..64af478 --- /dev/null +++ b/audacious-plugins-2.2-cfg_db_close.patch @@ -0,0 +1,48 @@ +diff -Nur audacious-plugins-2.2-orig/src/alarm/alarm.c audacious-plugins-2.2-cfg_db_close/src/alarm/alarm.c +--- audacious-plugins-2.2-orig/src/alarm/alarm.c 2009-11-22 23:49:52.000000000 +0100 ++++ audacious-plugins-2.2-cfg_db_close/src/alarm/alarm.c 2009-12-19 19:43:39.000000000 +0100 +@@ -354,6 +354,7 @@ + alarm_conf.day[daynum].min = DEFAULT_ALARM_MIN; + } + ++ aud_cfg_db_close(conf); + DEBUG("END alarm_read_config\n"); + } + +diff -Nur audacious-plugins-2.2-orig/src/lastfm/lastfm.c audacious-plugins-2.2-cfg_db_close/src/lastfm/lastfm.c +--- audacious-plugins-2.2-orig/src/lastfm/lastfm.c 2009-11-22 23:49:53.000000000 +0100 ++++ audacious-plugins-2.2-cfg_db_close/src/lastfm/lastfm.c 2009-12-19 19:43:39.000000000 +0100 +@@ -109,7 +109,7 @@ + { + aud_cfg_db_get_string(cfg, "audioscrobbler", "username", &username); + aud_cfg_db_get_string(cfg, "audioscrobbler", "password", &password); +- g_free(cfg); ++ aud_cfg_db_close(cfg); + } + if (username != NULL && password != NULL) + { +diff -Nur audacious-plugins-2.2-orig/src/neon/neon.c audacious-plugins-2.2-cfg_db_close/src/neon/neon.c +--- audacious-plugins-2.2-orig/src/neon/neon.c 2009-11-22 23:49:53.000000000 +0100 ++++ audacious-plugins-2.2-cfg_db_close/src/neon/neon.c 2009-12-19 19:43:39.000000000 +0100 +@@ -508,6 +508,7 @@ + aud_cfg_db_get_string(db, NULL, "proxy_user", &value); + if (!value) { + _DEBUG("<%p> proxy_auth requested but no proxy_user", userdata); ++ aud_cfg_db_close(db); + _LEAVE -1; + } + g_strlcpy(username, value, NE_ABUFSIZ); +@@ -516,11 +517,13 @@ + aud_cfg_db_get_string(db, NULL, "proxy_pass", &value); + if (!value) { + _DEBUG("<%p> proxy_auth requested but no proxy_pass", userdata); ++ aud_cfg_db_close(db); + _LEAVE -1; + } + g_strlcpy(password, value, NE_ABUFSIZ); + value = NULL; + ++ aud_cfg_db_close(db); + _LEAVE attempt; + } + diff --git a/audacious-plugins-2.2-neon-request.patch b/audacious-plugins-2.2-neon-request.patch new file mode 100644 index 0000000..67f1928 --- /dev/null +++ b/audacious-plugins-2.2-neon-request.patch @@ -0,0 +1,14 @@ +diff -Nur audacious-plugins-2.2-orig/src/neon/neon.c audacious-plugins-2.2-neon/src/neon/neon.c +--- audacious-plugins-2.2-orig/src/neon/neon.c 2009-11-22 23:49:53.000000000 +0100 ++++ audacious-plugins-2.2-neon/src/neon/neon.c 2009-12-19 19:02:17.000000000 +0100 +@@ -1354,7 +1354,9 @@ + kill_reader(h); + } + +- ne_request_destroy(h->request); ++ if (NULL != h->request) { ++ ne_request_destroy(h->request); ++ } + ne_session_destroy(h->session); + reset_rb(&h->rb); + diff --git a/audacious-plugins.spec b/audacious-plugins.spec index 69a71ad..1e6074d 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -5,7 +5,7 @@ Name: audacious-plugins Version: 2.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia URL: http://audacious-media-player.org/ @@ -23,7 +23,14 @@ Source0: audacious-plugins-fedora-%{version}.tar.bz2 Source1: audacious-sid.desktop Patch0: audacious-plugins-2.0.1-xmms-skindir.patch +# obsolete with version upgrade: declaration conflict for jack_free Patch1: audacious-plugins-2.2-jack.patch +# +Patch2: audacious-plugins-2.2-neon-request.patch +# submitted upstream +Patch3: audacious-plugins-2.2-cfg_db_close.patch +# +Patch4: audacious-plugins-2.2-bluetooth.patch BuildRequires: audacious-devel >= %{aud_ver} BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel @@ -153,8 +160,10 @@ in Vortex (.vtx) format. %prep %setup -q -n audacious-plugins-fedora-%{version} %patch0 -p1 -b .xmms-skindir -# obsolete with version upgrade: declaration conflict for jack_free %patch1 -p1 -b .jack +%patch2 -p1 -b .neon-request +%patch3 -p1 -b .cfg_db_close +%patch4 -p1 -b .bluetooth sed -i '\,^.SILENT:,d' buildsys.mk.in @@ -248,6 +257,11 @@ update-desktop-database &> /dev/null || : %changelog +* Sat Dec 19 2009 Michael Schwendt - 2.2-3 +- Beat bluetooth plugin a bit. +- Fix missing aud_cfg_db_close calls. +- Avoid that neon's ne_request_destroy() is called with a NULL ptr. + * Wed Dec 2 2009 Michael Schwendt - 2.2-2 - Move SID music plugin into audacious-plugins-sid package. Its built with libsidplay 1 while 3rd party package providers may