Make the pipe closing work all of the time (so far), memory leak fixes.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user