]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use an auto-reset event for Windows conditions
authorMoises Silva <moy@sangoma.com>
Wed, 2 Dec 2009 21:45:11 +0000 (21:45 +0000)
committerMoises Silva <moy@sangoma.com>
Wed, 2 Dec 2009 21:45:11 +0000 (21:45 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@924 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c
libs/freetdm/src/zap_threadmutex.c

index 5e69cf435665c31b16090ef690d2ae7d8ba56374..74368d5354773a1fdf9a4564e49e1fc4b8016dbc 100644 (file)
@@ -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
index 6128120934e0f1f6359dbbec53789c560f0fe1a3..4c633555e497b31e37cb77150cbc8f1dfdfd92f0 100644 (file)
@@ -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;
        }