diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-10-19 17:59:18 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-10-19 17:59:18 +0000 |
commit | ceddbfe68f6ec7949a4062716c8f9840a59c6888 (patch) | |
tree | abfecadbb9c1e5aea40701dd20d902cb7bccd962 /contrib/libs/c-ares/src/lib/ares_cancel.c | |
parent | 07f2e60d02d95eab14a86a4b9469db1af7795001 (diff) | |
parent | d920c750e476fa2dc80c45f990d9456b1afeadd1 (diff) | |
download | ydb-ceddbfe68f6ec7949a4062716c8f9840a59c6888.tar.gz |
Merge branch 'rightlib' into mergelibs-241019-1758
Diffstat (limited to 'contrib/libs/c-ares/src/lib/ares_cancel.c')
-rw-r--r-- | contrib/libs/c-ares/src/lib/ares_cancel.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/libs/c-ares/src/lib/ares_cancel.c b/contrib/libs/c-ares/src/lib/ares_cancel.c index c29d8ef82f..75600dea6b 100644 --- a/contrib/libs/c-ares/src/lib/ares_cancel.c +++ b/contrib/libs/c-ares/src/lib/ares_cancel.c @@ -37,18 +37,18 @@ void ares_cancel(ares_channel_t *channel) return; } - ares__channel_lock(channel); + ares_channel_lock(channel); - if (ares__llist_len(channel->all_queries) > 0) { - ares__llist_node_t *node = NULL; - ares__llist_node_t *next = NULL; + if (ares_llist_len(channel->all_queries) > 0) { + ares_llist_node_t *node = NULL; + ares_llist_node_t *next = NULL; /* Swap list heads, so that only those queries which were present on entry * into this function are cancelled. New queries added by callbacks of * queries being cancelled will not be cancelled themselves. */ - ares__llist_t *list_copy = channel->all_queries; - channel->all_queries = ares__llist_create(NULL); + ares_llist_t *list_copy = channel->all_queries; + channel->all_queries = ares_llist_create(NULL); /* Out of memory, this function doesn't return a result code though so we * can't report to caller */ @@ -57,31 +57,31 @@ void ares_cancel(ares_channel_t *channel) goto done; /* LCOV_EXCL_LINE: OutOfMemory */ } - node = ares__llist_node_first(list_copy); + node = ares_llist_node_first(list_copy); while (node != NULL) { ares_query_t *query; /* Cache next since this node is being deleted */ - next = ares__llist_node_next(node); + next = ares_llist_node_next(node); - query = ares__llist_node_claim(node); + query = ares_llist_node_claim(node); query->node_all_queries = NULL; /* NOTE: its possible this may enqueue new queries */ query->callback(query->arg, ARES_ECANCELLED, 0, NULL); - ares__free_query(query); + ares_free_query(query); node = next; } - ares__llist_destroy(list_copy); + ares_llist_destroy(list_copy); } /* See if the connections should be cleaned up */ - ares__check_cleanup_conns(channel); + ares_check_cleanup_conns(channel); ares_queue_notify_empty(channel); done: - ares__channel_unlock(channel); + ares_channel_unlock(channel); } |