diff --git a/src/idempotency/client/client_channel.c b/src/idempotency/client/client_channel.c index 35d6db5..7253f46 100644 --- a/src/idempotency/client/client_channel.c +++ b/src/idempotency/client/client_channel.c @@ -135,7 +135,7 @@ static int idempotency_channel_alloc_init(void *element, void *args) return result; } - if ((result=init_pthread_lock_cond_pair(&channel->lc_pair)) != 0) { + if ((result=init_pthread_lock_cond_pair(&channel->lcp)) != 0) { return result; } diff --git a/src/idempotency/client/client_channel.h b/src/idempotency/client/client_channel.h index 6111ee1..aafbe65 100644 --- a/src/idempotency/client/client_channel.h +++ b/src/idempotency/client/client_channel.h @@ -80,7 +80,7 @@ static inline int idempotency_client_channel_check_wait_ex( } idempotency_client_channel_check_reconnect(channel); - lcp_timedwait_sec(&channel->lc_pair, timeout); + lcp_timedwait_sec(&channel->lcp, timeout); if (__sync_add_and_fetch(&channel->established, 0)) { return 0; } else { diff --git a/src/idempotency/client/client_types.h b/src/idempotency/client/client_types.h index 8e992bc..59fd063 100644 --- a/src/idempotency/client/client_types.h +++ b/src/idempotency/client/client_types.h @@ -46,7 +46,7 @@ typedef struct idempotency_client_channel { time_t last_connect_time; //for connect frequency control time_t last_pkg_time; //last communication time time_t last_report_time; //last report time for rpc receipt - pthread_lock_cond_pair_t lc_pair; //for channel valid check and notify + pthread_lock_cond_pair_t lcp; //for channel valid check and notify struct fast_mblock_man receipt_allocator; struct fast_task_info *task; struct fc_queue queue; diff --git a/src/idempotency/client/receipt_handler.c b/src/idempotency/client/receipt_handler.c index a8ed609..ecaf850 100644 --- a/src/idempotency/client/receipt_handler.c +++ b/src/idempotency/client/receipt_handler.c @@ -284,9 +284,9 @@ static int deal_setup_channel_response(struct fast_task_info *task) } channel->buffer_size = FC_MIN(buffer_size, task->size); - PTHREAD_MUTEX_LOCK(&channel->lc_pair.lock); - pthread_cond_broadcast(&channel->lc_pair.cond); - PTHREAD_MUTEX_UNLOCK(&channel->lc_pair.lock); + PTHREAD_MUTEX_LOCK(&channel->lcp.lock); + pthread_cond_broadcast(&channel->lcp.cond); + PTHREAD_MUTEX_UNLOCK(&channel->lcp.lock); if (channel->waiting_resp_qinfo.head != NULL) { bool notify;