/* * ndmpd_tar_restore_abort * * Aborts the restore operation by stopping the writer thread (V2 only) */ int ndmpd_tar_restore_abort(void *module_cookie) { ndmp_lbr_params_t *nlp; nlp = (ndmp_lbr_params_t *)module_cookie; if (nlp != NULL && nlp->nlp_session != NULL) { if (nlp->nlp_session->ns_data.dd_mover.addr_type == NDMP_ADDR_TCP && nlp->nlp_session->ns_data.dd_sock != -1) { (void) close(nlp->nlp_session->ns_data.dd_sock); nlp->nlp_session->ns_data.dd_sock = -1; } nlp_event_nw(nlp->nlp_session); ndmp_stop_writer_thread(nlp->nlp_session); } return (0); }
/* * ndmpd_tar_restore_abort * * Aborts the restore operation by stopping the writer thread (V2 only) */ int ndmpd_tar_restore_abort(void *module_cookie) { ndmp_lbr_params_t *nlp; nlp = (ndmp_lbr_params_t *)module_cookie; if (nlp != NULL && nlp->nlp_session != NULL) { (void) mutex_lock(&nlp->nlp_mtx); if (nlp->nlp_session->ns_data.dd_mover.addr_type == NDMP_ADDR_TCP && nlp->nlp_session->ns_data.dd_sock != -1) { (void) close(nlp->nlp_session->ns_data.dd_sock); nlp->nlp_session->ns_data.dd_sock = -1; } (void) cond_broadcast(&nlp->nlp_cv); (void) mutex_unlock(&nlp->nlp_mtx); ndmp_stop_writer_thread(nlp->nlp_session); } return (0); }