summaryrefslogtreecommitdiff
path: root/util-misc
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-04-06 07:53:02 +0000
committerYann Ylavic <ylavic@apache.org>2018-04-06 07:53:02 +0000
commit4fd6316b9f6b8dd598c484c5145b9766e3508ce5 (patch)
tree89c102008e03ee59157c75cf6cb940c96f4e7ab3 /util-misc
parent8276a99ce92d603d62c233059495b8d08f3c2c0f (diff)
downloadapr-4fd6316b9f6b8dd598c484c5145b9766e3508ce5.tar.gz
reslist: follow up to r1828289: enfore empty list requirement when setting fifo.
The doxygen remark wasn't enough as noted by Ruediger. [Reverted by r1829102] git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1828492 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'util-misc')
-rw-r--r--util-misc/apr_reslist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/util-misc/apr_reslist.c b/util-misc/apr_reslist.c
index ddc9eb5ea..6e477110f 100644
--- a/util-misc/apr_reslist.c
+++ b/util-misc/apr_reslist.c
@@ -445,9 +445,15 @@ APR_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
reslist->timeout = timeout;
}
-APR_DECLARE(void) apr_reslist_fifo_set(apr_reslist_t *reslist, int fifo)
+APR_DECLARE(apr_status_t) apr_reslist_fifo_set(apr_reslist_t *reslist,
+ int fifo)
{
+ if (!APR_RING_EMPTY(&reslist->avail_list, apr_res_t, link)) {
+ return APR_EBUSY;
+ }
+
reslist->fifo = fifo;
+ return APR_SUCCESS;
}
APR_DECLARE(apr_uint32_t) apr_reslist_acquired_count(apr_reslist_t *reslist)