[brasero] When BraseroBurn has to reprobe for a medium don't wait for it to show up use brasero_drive_probing
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] When BraseroBurn has to reprobe for a medium don't wait for it to show up use brasero_drive_probing
- Date: Sun, 4 Oct 2009 12:21:27 +0000 (UTC)
commit 25cb43612317de0bef9c96bcfa7cc486edd7f61e
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Oct 2 10:38:35 2009 +0200
When BraseroBurn has to reprobe for a medium don't wait for it to show up use brasero_drive_probing () instead which is more reliable
libbrasero-burn/brasero-burn.c | 5 +++--
libbrasero-media/Makefile.am | 3 ++-
libbrasero-media/brasero-medium-monitor.c | 10 ++--------
3 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 375ea5d..ac8152a 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -55,6 +55,8 @@
#include "burn-task.h"
#include "brasero-caps-burn.h"
+#include "brasero-drive-priv.h"
+
#include "brasero-volume.h"
#include "brasero-drive.h"
@@ -260,7 +262,6 @@ static BraseroBurnResult
brasero_burn_reprobe (BraseroBurn *burn)
{
guint attempts = 0;
- BraseroMedium *medium;
BraseroBurnPrivate *priv;
BraseroBurnResult result = BRASERO_BURN_OK;
@@ -270,7 +271,7 @@ brasero_burn_reprobe (BraseroBurn *burn)
/* reprobe the medium and wait for it to be probed */
brasero_drive_reprobe (priv->dest);
- while (attempts < MAX_REPROBE_ATTEMPTS && (medium = brasero_drive_get_medium (priv->dest)) == NULL) {
+ while (attempts < MAX_REPROBE_ATTEMPTS && brasero_drive_probing (priv->dest)) {
result = brasero_burn_sleep (burn, 250);
attempts ++;
}
diff --git a/libbrasero-media/Makefile.am b/libbrasero-media/Makefile.am
index 193b29e..b3e108b 100644
--- a/libbrasero-media/Makefile.am
+++ b/libbrasero-media/Makefile.am
@@ -127,7 +127,8 @@ libbrasero_media_la_SOURCES = \
brasero-gio-operation.c \
scsi-inquiry.c \
scsi-prevent-allow-medium-removal.c \
- scsi-inquiry.h
+ scsi-inquiry.h \
+ brasero-drive-priv.h
# FreeBSD's SCSI CAM interface
if HAVE_CAM_LIB_H
diff --git a/libbrasero-media/brasero-medium-monitor.c b/libbrasero-media/brasero-medium-monitor.c
index 27ae909..7721c62 100644
--- a/libbrasero-media/brasero-medium-monitor.c
+++ b/libbrasero-media/brasero-medium-monitor.c
@@ -41,6 +41,8 @@
#include "brasero-media-private.h"
+#include "brasero-drive-priv.h"
+
#include "scsi-device.h"
#include "scsi-utils.h"
#include "scsi-spc1.h"
@@ -80,14 +82,6 @@ G_DEFINE_TYPE (BraseroMediumMonitor, brasero_medium_monitor, G_TYPE_OBJECT);
/**
- * These definitions go here as they shouldn't be public and they're used only
- * here.
- */
-
-gboolean
-brasero_drive_probing (BraseroDrive *drive);
-
-/**
* brasero_medium_monitor_get_drive:
* @monitor: a #BraseroMediumMonitor
* @device: the path of the device
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]