New API call Xorriso_start_msg_watcher()
This commit is contained in:
@ -321,6 +321,11 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||
m->lib_msg_queue_lock_ini= 0;
|
||||
m->result_msglists_lock_ini= 0;
|
||||
m->write_to_channel_lock_ini= 0;
|
||||
m->msg_watcher_lock_ini= 0;
|
||||
m->msg_watcher_state= 0;
|
||||
m->msgw_result_handler= NULL;
|
||||
m->msgw_info_handler= NULL;
|
||||
m->msgw_stack_handle= -1;
|
||||
m->msglist_stackfill= 0;
|
||||
m->status_history_max= Xorriso_status_history_maX;
|
||||
m->scsi_log= 0;
|
||||
@ -454,6 +459,10 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
|
||||
if(ret != 0)
|
||||
goto failure;
|
||||
m->problem_status_lock_ini= 1;
|
||||
ret= pthread_mutex_init(&(m->msg_watcher_lock), NULL);
|
||||
if(ret != 0)
|
||||
goto failure;
|
||||
m->msg_watcher_lock_ini= 1;
|
||||
|
||||
if(leafname != NULL)
|
||||
free(leafname);
|
||||
@ -545,6 +554,8 @@ int Xorriso_destroy(struct XorrisO **xorriso, int flag)
|
||||
pthread_mutex_destroy(&(m->write_to_channel_lock));
|
||||
if(m->problem_status_lock_ini)
|
||||
pthread_mutex_destroy(&(m->problem_status_lock));
|
||||
if(m->msg_watcher_lock_ini)
|
||||
pthread_mutex_destroy(&(m->msg_watcher_lock));
|
||||
|
||||
free((char *) m);
|
||||
*xorriso= NULL;
|
||||
|
Reference in New Issue
Block a user