From 531c69a9d3258e12a82f3faa35ae17d2c8d3126c Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Mon, 17 Nov 2008 22:17:24 +0000 Subject: [PATCH] Fix some stuff --- ecdb/trunk/src/ecdb.c | 1 + ecdb/trunk/src/ecdb_burn.c | 30 +++++++++++------------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ecdb/trunk/src/ecdb.c b/ecdb/trunk/src/ecdb.c index 1a2120e..f7b51f2 100644 --- a/ecdb/trunk/src/ecdb.c +++ b/ecdb/trunk/src/ecdb.c @@ -135,6 +135,7 @@ main(int argc, char **argv) SHUTDOWN: burn_finish(); iso_finish(); + ewl_shutdown(); ecore_file_shutdown(); ecore_string_shutdown(); ecore_evas_shutdown(); diff --git a/ecdb/trunk/src/ecdb_burn.c b/ecdb/trunk/src/ecdb_burn.c index dcaa004..ed3be97 100644 --- a/ecdb/trunk/src/ecdb_burn.c +++ b/ecdb/trunk/src/ecdb_burn.c @@ -159,7 +159,6 @@ ecdb_drive_progress_update(void *data) const Ecdb_Project *proj; BurnProgress p; struct burn_drive *drive; - BurnDriveStatus stat; proj = data; @@ -173,27 +172,20 @@ ecdb_drive_progress_update(void *data) drive = proj->drive->tangible[0].drive; printf("Progress update active\n"); - while (TRUE) - { - stat = burn_drive_get_status(drive, &p); - if (stat == BURN_DRIVE_SPAWNING) - { - usleep(100000); - continue; - } - else if (stat == BURN_DRIVE_IDLE) - { - ecore_pipe_write(proj->pipe, "AC", - sizeof("AC")); - ecore_pipe_del(proj->pipe); - /* Call the finished event handler here */ - pthread_exit(NULL); - break; - } + while (burn_drive_get_status(drive, NULL) == BURN_DRIVE_SPAWNING) + usleep(100000); - ecore_pipe_write(proj->pipe, &p, sizeof(p)); + while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) + { + if (p.sectors > 0) + ecore_pipe_write(proj->pipe, &p, sizeof(p)); usleep(100000); } + + ecore_pipe_write(proj->pipe, "AC", sizeof("AC")); + ecore_pipe_del(proj->pipe); + /* Call the finished event handler here */ + pthread_exit(NULL); } static void