patches/sound-juicer-02-dev.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 18021 e075e2d33149
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446

--- sound-juicer-2.23.2/src/sj-main.c.old	Fri Aug 29 16:29:11 2008
+++ sound-juicer-2.23.2/src/sj-main.c	Fri Aug 29 16:29:27 2008
@@ -1814,8 +1814,14 @@
   if (device == NULL && uris == NULL) {
     device_changed_cb (gconf_client, -1, gconf_client_get_entry (gconf_client, GCONF_DEVICE, NULL, TRUE, NULL), GINT_TO_POINTER (TRUE));
   } else {
-    if (device)
+    if (device) {
+#ifdef __sun
+      if (strstr(device, "/dev/dsk/") != NULL ) {
+        device = g_strdup_printf("/dev/rdsk/%s", device + strlen("/dev/dsk/"));
+      }
+#endif
       set_device (device, TRUE);
+    }
     else {
       char *d;
 
@@ -1827,7 +1827,11 @@
       /* Mash up the CDDA URIs into a device path */
       if (g_str_has_prefix (uris[0], "cdda://")) {
       	gint len;
+#ifdef __sun
+        d = g_strdup_printf ("/dev/rdsk/%s", uris[0] + strlen ("cdda://"));
+#else
         d = g_strdup_printf ("/dev/%s%c", uris[0] + strlen ("cdda://"), '\0');
+#endif
         /* Take last '/' out of path, or set_device thinks it is part of the device name */
 		len = strlen (d);
 		if (d[len - 1] == '/')