Search
lxdream.org :: lxdream/src/gdrom/gdrom.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gdrom.c
changeset 695:2bb59940ff35
prev691:ad3356543392
next709:18c39a8e504c
author nkeynes
date Sun Jun 22 03:58:24 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Avoid double notifications on gdrom disc change (unmount/mount)
file annotate diff log raw
1.1 --- a/src/gdrom/gdrom.c Thu Jun 19 04:40:37 2008 +0000
1.2 +++ b/src/gdrom/gdrom.c Sun Jun 22 03:58:24 2008 +0000
1.3 @@ -57,7 +57,7 @@
1.4 gdrom_image_class_t extclz = NULL;
1.5
1.6 if( fd == -1 ) {
1.7 - return NULL;
1.8 + return NULL;
1.9 }
1.10
1.11 f = fdopen(fd, "ro");
1.12 @@ -99,7 +99,9 @@
1.13 void gdrom_mount_disc( gdrom_disc_t disc )
1.14 {
1.15 if( disc != gdrom_disc ) {
1.16 - gdrom_unmount_disc();
1.17 + if( gdrom_disc != NULL ) {
1.18 + gdrom_disc->close(gdrom_disc);
1.19 + }
1.20 gdrom_disc = disc;
1.21 gdrom_image_dump_info( disc );
1.22 gdrom_fire_disc_changed( disc );
1.23 @@ -109,7 +111,7 @@
1.24 gboolean gdrom_mount_image( const gchar *filename )
1.25 {
1.26 gdrom_disc_t disc = gdrom_image_open(filename);
1.27 - if( disc != NULL ) {
1.28 + if( disc != NULL ) {
1.29 gdrom_mount_disc( disc );
1.30 return TRUE;
1.31 }
.