Bug#259985: Patch: sound-juicer chooses correct drive

Emil Soleyman-Zomalan Emil Soleyman-Zomalan <emil@nishra.com>, 259985@bugs.debian.org
Sat, 17 Jul 2004 21:18:29 -0700


This is a multi-part MIME message sent by reportbug.

--===============1413364078==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: sound-juicer
Version: 0.5.12-1
Followup-For: Bug #259985


I have tracked this particular problem down to src/sj-prefs.c in the
cd_drive_exists function (lines 81-90). The list variable 'l' (ell) of
type GList is assigned the contents of another list variable 'cdroms'. 
However, since 'cdroms' is initialized NULL at the top of the source
file, we are not able to proceed inside the FOR loop within 
cd_drive_exists().

To fix this bug, I prepended the following line of code before the FOR
loop so that the 'cdroms' list variable is populated with available CD 
drives.

You will find my (small) patch below.

-
Emil Soleyman-Zomalan


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (400, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-mh2
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages sound-juicer depends on:
ii  gconf2                    2.6.2-1        GNOME configuration database syste
ii  gstreamer0.8-cdparanoia   0.8.2-2        cdparanoia plugin for GStreamer
ii  gstreamer0.8-flac         0.8.2-2        FLAC plugin for GStreamer
ii  gstreamer0.8-misc         0.8.2-2        Collection of various GStreamer pl
ii  gstreamer0.8-vorbis       0.8.2-2        Vorbis plugin for GStreamer
ii  libart-2.0-2              2.3.16-5       Library of functions for 2D graphi
ii  libatk1.0-0               1.6.1-2        The ATK accessibility toolkit
ii  libbonobo2-0              2.6.2-4        Bonobo CORBA interfaces library
ii  libbonoboui2-0            2.6.1-1        The Bonobo UI library
ii  libc6                     2.3.2.ds1-13   GNU C Library: Shared libraries an
ii  libgcc1                   1:3.3.4-3      GCC support library
ii  libgconf2-4               2.6.2-1        GNOME configuration database syste
ii  libglade2-0               1:2.4.0-1      Library to load .glade files at ru
ii  libglib2.0-0              2.4.2-1        The GLib library of C routines
ii  libgnome2-0               2.6.1-8        The GNOME 2 library - runtime file
ii  libgnomecanvas2-0         2.6.1.1-2      A powerful object-oriented display
ii  libgnomeui-0              2.6.1.1-3      The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0            2.6.1.1-5      The GNOME virtual file-system libr
ii  libgstreamer0.8-0         0.8.3-3        Core GStreamer libraries, plugins,
ii  libgtk2.0-0               2.4.3-3        The GTK+ graphical user interface 
ii  libice6                   4.3.0.dfsg.1-6 Inter-Client Exchange library
ii  libmusicbrainz4           2.1.1-3        Second generation incarnation of t
ii  liborbit2                 1:2.10.2-1.1   libraries for ORBit2 - a CORBA ORB
hi  libpango1.0-0             1.4.0-4        Layout and rendering of internatio
ii  libpopt0                  1.7-4          lib for parsing cmdline parameters
ii  libsm6                    4.3.0.dfsg.1-6 X Window System Session Management
ii  libstdc++5                1:3.3.4-3      The GNU Standard C++ Library v3
ii  libxml2                   2.6.11-1       GNOME XML library
ii  xlibs                     4.3.0.dfsg.1-6 X Window System client libraries m
ii  zlib1g                    1:1.2.1.1-5    compression library - runtime

-- no debconf information

--===============1413364078==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="sj-correct-drive.patch"

--- sj-prefs.c	2004-06-10 07:36:02 -0700
+++ sj-prefs.c.modified	2004-07-17 20:59:06 -0700
@@ -82,6 +82,7 @@
 {
   GList *l;
   if (device == NULL) return FALSE;
+  cdroms = scan_for_cdroms (FALSE, FALSE);
   for (l = cdroms; l != NULL; l = l->next) {
     if (strcmp (((CDDrive *) (l->data))->device, device) == 0)
       return TRUE;

--===============1413364078==--