]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: wait for state change to be cleared when placing outgoing calls
authorMoises Silva <moy@sangoma.com>
Thu, 25 Nov 2010 14:35:14 +0000 (09:35 -0500)
committerMoises Silva <moy@sangoma.com>
Thu, 25 Nov 2010 14:37:25 +0000 (09:37 -0500)
         this fixes a race where the call is hangup even before the state
         DIALING is processed and therefore the HANGUP state change is
         ignored.

libs/freetdm/src/ftdm_io.c

index 0aeaeedce4768f7ee5cb866bea30c07b5d7d964a..bcceba58caf084607ad071d5a32e6cae05de85df 100644 (file)
@@ -2270,6 +2270,8 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_place(const char *file, const char
        UNREFERENCED_PARAMETER(line);
 #endif
 
+       ftdm_wait_for_flag_cleared(ftdmchan, FTDM_CHANNEL_STATE_CHANGE, 100);
+
        ftdm_channel_unlock(ftdmchan);
 
        return status;