#pragma warning(disable:4127)
#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) \
do { \
int __safety = time; \
zap_wait_for_flag_cleared(obj, ZAP_CHANNEL_STATE_CHANGE, 100); \
} 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 {
ZAP_STATE_CHANGE_FAIL,
int r = 0;
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_set_state_r(zchan, ZAP_CHANNEL_STATE_TERMINATING, 0, r);
if (!zap_test_sflag(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,
zchan->physical_span_id-1,
zchan->physical_chan_id-1,