Fix a couple warnings and problems

This commit is contained in:
Jaime Thomas 2008-05-21 01:38:44 +00:00
parent 2fe68e7745
commit f210984e81
3 changed files with 17 additions and 22 deletions

View File

@ -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;
};

View File

@ -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);

View File

@ -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();