rpms/audacious-plugins/F-12 audacious-plugins-2.1-bluetooth.patch, NONE, 1.1 audacious-plugins-2.1-cfg_db_close.patch, NONE, 1.1 audacious-plugins-2.2-bluetooth.patch, NONE, 1.1 audacious-plugins-2.2-neon-request.patch, NONE, 1.1 audacious-plugins.spec, 1.74, 1.75

Michael Schwendt mschwendt at fedoraproject.org
Sat Dec 19 18:58:38 UTC 2009


Author: mschwendt

Update of /cvs/pkgs/rpms/audacious-plugins/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14415

Modified Files:
	audacious-plugins.spec 
Added Files:
	audacious-plugins-2.1-bluetooth.patch 
	audacious-plugins-2.1-cfg_db_close.patch 
	audacious-plugins-2.2-bluetooth.patch 
	audacious-plugins-2.2-neon-request.patch 
Log Message:
* Sat Dec 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-27
- Beat bluetooth plugin a bit.
- Fix missing aud_cfg_db_close calls.


audacious-plugins-2.1-bluetooth.patch:
 bluetooth.c |   28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

--- NEW FILE audacious-plugins-2.1-bluetooth.patch ---
diff -Nur audacious-plugins-fedora-2.1-orig/src/bluetooth/bluetooth.c audacious-plugins-fedora-2.1-bluetooth/src/bluetooth/bluetooth.c
--- audacious-plugins-fedora-2.1-orig/src/bluetooth/bluetooth.c	2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-bluetooth/src/bluetooth/bluetooth.c	2009-12-19 19:19:16.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,"alsaplug","pcm_device", "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,"alsaplug","pcm_device", "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");

audacious-plugins-2.1-cfg_db_close.patch:
 alarm/alarm.c   |    1 +
 lastfm/lastfm.c |    2 +-
 neon/neon.c     |    3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

--- NEW FILE audacious-plugins-2.1-cfg_db_close.patch ---
diff -Nur audacious-plugins-fedora-2.1-orig/src/alarm/alarm.c audacious-plugins-fedora-2.1-cfg_db_close/src/alarm/alarm.c
--- audacious-plugins-fedora-2.1-orig/src/alarm/alarm.c	2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-cfg_db_close/src/alarm/alarm.c	2009-12-19 13:00:16.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-fedora-2.1-orig/src/lastfm/lastfm.c audacious-plugins-fedora-2.1-cfg_db_close/src/lastfm/lastfm.c
--- audacious-plugins-fedora-2.1-orig/src/lastfm/lastfm.c	2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-cfg_db_close/src/lastfm/lastfm.c	2009-12-19 13:06:39.000000000 +0100
@@ -116,7 +116,7 @@
                                 &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-fedora-2.1-orig/src/neon/neon.c audacious-plugins-fedora-2.1-cfg_db_close/src/neon/neon.c
--- audacious-plugins-fedora-2.1-orig/src/neon/neon.c	2009-07-07 00:40:36.000000000 +0200
+++ audacious-plugins-fedora-2.1-cfg_db_close/src/neon/neon.c	2009-12-19 13:00:16.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;
 }
 

audacious-plugins-2.2-bluetooth.patch:
 bluetooth.c |   26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

--- NEW FILE audacious-plugins-2.2-bluetooth.patch ---
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 18:59:02.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,20 +59,26 @@
 
 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);
 
 }
@@ -84,18 +91,21 @@
         close_window();
         config =0;
     }
-    remove_bonding(bonded_dev);
+    if (bonded_dev) {
+        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");

audacious-plugins-2.2-neon-request.patch:
 neon.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- NEW FILE audacious-plugins-2.2-neon-request.patch ---
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);
 


Index: audacious-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-12/audacious-plugins.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -p -r1.74 -r1.75
--- audacious-plugins.spec	17 Dec 2009 22:13:47 -0000	1.74
+++ audacious-plugins.spec	19 Dec 2009 18:58:38 -0000	1.75
@@ -5,7 +5,7 @@
 
 Name: audacious-plugins
 Version: 2.1
-Release: 26%{?dist}
+Release: 27%{?dist}
 Summary: Plugins for the Audacious media player
 Group: Applications/Multimedia
 URL: http://audacious-media-player.org/
@@ -47,7 +47,10 @@ Patch17: audacious-plugins-2.1-pulseaudi
 Patch18: audacious-plugins-2.1-sid-playfix.patch
 #
 Patch19: audacious-plugins-2.1-neon-request.patch
-
+# submitted upstream
+Patch20: audacious-plugins-2.1-cfg_db_close.patch
+#
+Patch21: audacious-plugins-2.1-bluetooth.patch
 
 BuildRequires: audacious-devel >= %{aud_ver}
 BuildRequires: jack-audio-connection-kit-devel libsamplerate-devel
@@ -186,6 +189,8 @@ vortex compressed files.
 %patch17 -p1 -b .no-drain
 %patch18 -p1 -b .sid-playfix
 %patch19 -p1 -b .neon-request
+%patch20 -p1 -b .cfg_db_close
+%patch21 -p1 -b .bluetooth
 
 sed -i '\,^.SILENT:,d' buildsys.mk.in
 
@@ -269,6 +274,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Dec 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-27
+- Beat bluetooth plugin a bit.
+- Fix missing aud_cfg_db_close calls.
+
 * Thu Dec 17 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 2.1-26
 - Avoid that neon's ne_request_destroy() is called with a NULL ptr.
 




More information about the fedora-extras-commits mailing list