From 7625898596c9a6e5328681cccf0f5b7cacd3b864 Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Wed, 21 May 2008 01:38:44 +0000 Subject: [PATCH] Fix a couple warnings and problems --- experimental/ecdb/trunk/src/ecdb.c | 3 +-- experimental/ecdb/trunk/src/ecdb_burn.c | 29 +++++++++++------------- experimental/ecdb/trunk/src/ecdb_image.c | 7 +++--- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/experimental/ecdb/trunk/src/ecdb.c b/experimental/ecdb/trunk/src/ecdb.c index 5bea7cad..8ba3b391 100644 --- a/experimental/ecdb/trunk/src/ecdb.c +++ b/experimental/ecdb/trunk/src/ecdb.c @@ -56,7 +56,6 @@ main(int argc, char **argv) } i++; } - proj->simulate = TRUE; proj->publisher_id = proj->data_preparer_id = proj->system_id = proj->application_id = proj->copywrite_id = proj->abstract_id = proj->biblio_id = "ecdb"; @@ -82,8 +81,8 @@ main(int argc, char **argv) SHUTDOWN: burn_finish(); iso_finish(); - ecore_shutdown(); ecore_file_shutdown(); + ecore_shutdown(); printf("Program Done\n"); return ret; }; diff --git a/experimental/ecdb/trunk/src/ecdb_burn.c b/experimental/ecdb/trunk/src/ecdb_burn.c index 0397bc3c..c0e4e071 100644 --- a/experimental/ecdb/trunk/src/ecdb_burn.c +++ b/experimental/ecdb/trunk/src/ecdb_burn.c @@ -114,27 +114,24 @@ ecdb_burn_project(Ecdb_Burn_Project *proj) track = burn_track_create(); burn_track_define_data(track, 0, padding, 1, proj->burn_mode); - while ((source = ecdb_image_project(proj))) - { - if (burn_track_set_source(track, source) != BURN_SOURCE_OK) - { - printf("Error: Cannot attach source object to track " - "object!\n"); - return FALSE; - } - - burn_session_add_track(data->session, track, BURN_POS_END); - ecore_list_append(data->sources, source); - ecore_list_append(data->tracks, track); - i++; - } - - if (!i) + source = ecdb_image_project(proj); + if (!source) { printf("Failed to add any files to burn disc!\n"); return FALSE; } + if (burn_track_set_source(track, source) != BURN_SOURCE_OK) + { + printf("Error: Cannot attach source object to track " + "object!\n"); + return FALSE; + } + + burn_session_add_track(data->session, track, BURN_POS_END); + ecore_list_append(data->sources, source); + ecore_list_append(data->tracks, track); + opts = burn_write_opts_new(ECDB_PROJECT(proj)->drive-> tangible[0].drive); burn_write_opts_set_perform_opc(opts, proj->opc); diff --git a/experimental/ecdb/trunk/src/ecdb_image.c b/experimental/ecdb/trunk/src/ecdb_image.c index fd80cfe7..24775bc3 100644 --- a/experimental/ecdb/trunk/src/ecdb_image.c +++ b/experimental/ecdb/trunk/src/ecdb_image.c @@ -47,8 +47,8 @@ ecdb_source_child_append(Ecdb_Source *src, Ecdb_Source *child) src->num_children++; src->children = realloc(src->children, sizeof(Ecdb_Source) * (src->num_children + 1)); - src->children[src->num_children] = child; - src->children[src->num_children + 1] = NULL; + src->children[src->num_children - 1] = child; + src->children[src->num_children] = NULL; } void @@ -99,11 +99,10 @@ ecdb_image_project(Ecdb_Burn_Project *proj) IsoWriteOpts *opts; BurnSource *data_src, *fifo_src; - if ((!proj->files) || (!proj->files->dst)) + if ((!proj->files) || (!proj->files->num_children)) return NULL; /* To handle already-suplied image files */ - efreet_mime_init(); if (proj->files->num_children == 1) { efreet_mime_init();