fix build breakage from r951

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@953 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2010-01-09 17:29:52 +00:00
parent 258e160057
commit cf57d7bb0b
2 changed files with 14 additions and 15 deletions

View File

@ -269,6 +269,18 @@
#pragma warning(disable:4127) #pragma warning(disable:4127)
#endif #endif
#define zap_set_state_locked_wait(obj, s) \
do { \
int __safety = 100; \
zap_set_state_locked(obj, s); \
while(__safety-- && zap_test_flag(obj, ZAP_CHANNEL_STATE_CHANGE)) { \
zap_sleep(10); \
} \
if(!__safety) { \
zap_log(ZAP_LOG_CRIT, "State change not completed\n"); \
} \
} while(0);
#define zap_wait_for_flag_cleared(obj, flag, time) \ #define zap_wait_for_flag_cleared(obj, flag, time) \
do { \ do { \
int __safety = time; \ int __safety = time; \
@ -288,19 +300,6 @@
zap_wait_for_flag_cleared(obj, ZAP_CHANNEL_STATE_CHANGE, 100); \ zap_wait_for_flag_cleared(obj, ZAP_CHANNEL_STATE_CHANGE, 100); \
} while(0); } while(0);
#define zap_set_state_locked_wait(obj, s) \
do { \
int __safety = 100; \
zap_set_state_locked(obj, s); \
while(__safety-- && zap_test_flag(obj, ZAP_CHANNEL_STATE_CHANGE)) { \
zap_sleep(10); \
} \
if(!__safety) { \
zap_log(ZAP_LOG_CRIT, "State change not completed\n"); \
} \
} while(0);
typedef enum { typedef enum {
ZAP_STATE_CHANGE_FAIL, ZAP_STATE_CHANGE_FAIL,

View File

@ -626,7 +626,7 @@ static void handle_call_start_nack(zap_span_t *span, sangomabc_connection_t *mco
int r = 0; int r = 0;
assert(!zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND)); assert(!zap_test_flag(zchan, ZAP_CHANNEL_OUTBOUND));
zchan->call_data = (void*)event->event_id; zchan->call_data = (void*)(intptr_t)event->event_id;
zap_mutex_lock(zchan->mutex); zap_mutex_lock(zchan->mutex);
zap_set_state_r(zchan, ZAP_CHANNEL_STATE_TERMINATING, 0, r); zap_set_state_r(zchan, ZAP_CHANNEL_STATE_TERMINATING, 0, r);
@ -992,7 +992,7 @@ static __inline__ void state_advance(zap_channel_t *zchan)
if (!zap_test_sflag(zchan, SFLAG_SENT_FINAL_MSG)) { if (!zap_test_sflag(zchan, SFLAG_SENT_FINAL_MSG)) {
zap_set_sflag_locked(zchan, SFLAG_SENT_FINAL_MSG); zap_set_sflag_locked(zchan, SFLAG_SENT_FINAL_MSG);
if (zchan->call_data && ((uint32_t)zchan->call_data == SIGBOOST_EVENT_CALL_START_NACK)) { if (zchan->call_data && ((uint32_t)(intptr_t)zchan->call_data == SIGBOOST_EVENT_CALL_START_NACK)) {
sangomabc_exec_command(mcon, sangomabc_exec_command(mcon,
zchan->physical_span_id-1, zchan->physical_span_id-1,
zchan->physical_chan_id-1, zchan->physical_chan_id-1,