use an auto-reset event for Windows conditions
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@924 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
d94d016cef
commit
ff473f4adc
|
@ -791,6 +791,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
|
|||
err = sangoma_tdm_txsig_offhook(zchan->sockfd,&tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring-off Failed");
|
||||
zap_log(ZAP_LOG_ERROR, "sangoma_tdm_txsig_offhook failed\n");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
zap_clear_pflag_locked(zchan, WP_RINGING);
|
||||
|
@ -799,6 +800,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
|
|||
err=sangoma_tdm_txsig_start(zchan->sockfd,&tdm_api);
|
||||
if (err) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "Ring Failed");
|
||||
zap_log(ZAP_LOG_ERROR, "sangoma_tdm_txsig_start failed\n");
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
zap_set_pflag_locked(zchan, WP_RINGING);
|
||||
|
@ -817,6 +819,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(wanpipe_poll_event)
|
|||
} else if (SANG_STATUS_SUCCESS == sangstatus) {
|
||||
r = 1; /* hopefully we never need how many changed -_- */
|
||||
} else {
|
||||
zap_log(ZAP_LOG_ERROR, "sangoma_waitfor_many failed: %d, %s\n", sangstatus, strerror(errno));
|
||||
r = -1;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -251,7 +251,7 @@ OZ_DECLARE(zap_status_t) zap_condition_create(zap_condition_t **incondition, zap
|
|||
}
|
||||
|
||||
#ifdef WIN32
|
||||
condition->condition = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
condition->condition = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
if (!condition->condition) {
|
||||
goto failed;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue