Make the pipe closing work all of the time (so far), memory leak fixes.

This commit is contained in:
Jaime Thomas
2008-12-26 16:41:27 +00:00
parent 8f3f36891a
commit f90d42137c
4 changed files with 23 additions and 9 deletions

View File

@@ -78,7 +78,7 @@ ecdb_erase_disc(Ecdb_Erase_Project *proj)
{
printf("Beginning to erase disc!\n");
ECDB_PROJECT(proj)->pipe = ecore_pipe_add(ecdb_erase_progress_handler,
NULL);
proj);
burn_disc_erase(ECDB_PROJECT(proj)->drive->tangible[0].drive,
proj->quick);
pthread_create(&progress_update, NULL, ecdb_drive_progress_update, proj);
@@ -102,9 +102,11 @@ ecdb_erase_progress_handler(void *data, void *buffer, unsigned int nbyte)
static int last_sector = 0;
Edje_Message_Int_Set *progress_msg;
if ((nbyte != sizeof(BurnProgress)) || (!strcmp((char *)buffer, "AC")))
printf("In progress handler, %d, %d\n", sizeof(BurnProgress), nbyte);
if (nbyte != sizeof(BurnProgress))
{
ecore_event_add(ECDB_DRIVE_ACTION_FINISHED, NULL, NULL, NULL);
printf("Adding event to queue.\n");
last_sector = 0;
return;
}
@@ -151,6 +153,7 @@ ecdb_erase_finished(void *data, int type, void *event)
burn_drive_release(ECDB_PROJECT(proj)->drive->tangible[0].drive, 0);
burn_drive_info_free(ECDB_PROJECT(proj)->drive->tangible);
ecore_event_handler_del(ECDB_PROJECT(proj)->ev_handler);
ecore_pipe_del(ECDB_PROJECT(proj)->pipe);
ecdb_erase_project_destroy(proj);
ecdb_erase_cleanup();