Some small fixes, and a little polishing of erase function.
This commit is contained in:
@@ -13,7 +13,8 @@ struct Burn_Data
|
||||
int ecdb_burn_finished(void *data, int type, void *event);
|
||||
int ecdb_burn_project_init(Ecdb_Burn_Project *proj);
|
||||
int ecdb_erase_project_init(Ecdb_Erase_Project *proj);
|
||||
static void ecdb_burn_progress_handler(void *data, void *buffer, int nbyte);
|
||||
static void ecdb_burn_progress_handler(void *data, void *buffer,
|
||||
unsigned int nbyte);
|
||||
|
||||
Ecdb_Burn_Project *
|
||||
ecdb_burn_project_new(void)
|
||||
@@ -155,9 +156,10 @@ ecdb_burn_project(Ecdb_Burn_Project *proj)
|
||||
void *
|
||||
ecdb_drive_progress_update(void *data)
|
||||
{
|
||||
Ecdb_Project *proj;
|
||||
const Ecdb_Project *proj;
|
||||
BurnProgress p;
|
||||
struct burn_drive *drive;
|
||||
BurnDriveStatus stat;
|
||||
|
||||
proj = data;
|
||||
|
||||
@@ -173,27 +175,25 @@ ecdb_drive_progress_update(void *data)
|
||||
printf("Progress update active\n");
|
||||
while (TRUE)
|
||||
{
|
||||
proj->stat = burn_drive_get_status(drive, &p);
|
||||
if (proj->stat == BURN_DRIVE_SPAWNING)
|
||||
stat = burn_drive_get_status(drive, &p);
|
||||
ecore_pipe_write(proj->pipe, &p, sizeof(&p));
|
||||
if (stat == BURN_DRIVE_SPAWNING)
|
||||
{
|
||||
sleep(1);
|
||||
continue;
|
||||
}
|
||||
else if (proj->stat == BURN_DRIVE_IDLE)
|
||||
else if (stat == BURN_DRIVE_IDLE)
|
||||
{
|
||||
ecore_pipe_del(proj->pipe);
|
||||
/* Call the finished event handler here */
|
||||
pthread_exit(NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
ecore_pipe_write(proj->pipe, &p, sizeof(&p));
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ecdb_burn_progress_handler(void *data, void *buffer, int nbyte)
|
||||
ecdb_burn_progress_handler(void *data, void *buffer, unsigned int nbyte)
|
||||
{
|
||||
BurnProgress *p = buffer;
|
||||
|
||||
|
Reference in New Issue
Block a user