<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src/drivers/cdrom</tt></b></td></tr>
<tr><td><tt><a href="#file1">cdrom.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+8</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-4</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">70feb1749427 -> bd5893522efc</td></tr>
</table>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
When initial disc read-toc fails, return the actual failure error code rather than
overwriting it with LX_ERR_FILE_UNKNOWN - if the read-toc failed, we
identified the file, it just didn't work
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/drivers/cdrom</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>cdrom.c</b></big> <small id="info" style="color: #888888;" >70feb1749427 -> bd5893522efc</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/drivers/cdrom/cdrom.c
+++ lxdream/src/drivers/cdrom/cdrom.c
@@ -266,14 +266,18 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         }
     }
 
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    if( disc->read_toc != NULL && cdrom_disc_read_toc( disc, err ) ) {
-        /* All good */
-        return disc;
-    } else {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    if( disc->read_toc == NULL ) {
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >         /* No handler found for file */
         cdrom_disc_unref( disc );
         SET_ERROR( err, LX_ERR_FILE_UNKNOWN, "File '%s' could not be recognized as any known image file or device type", filename );
         return NULL;
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    } else if( !cdrom_disc_read_toc( disc, err ) ) {
+        cdrom_disc_unref( disc );
+        assert( err == NULL || err->code != LX_ERR_NONE ); /* Read-toc should have set an error code in this case */
+        return NULL;
+    } else {
+        /* All good */
+        return disc;
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     }
 }
 
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>