]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Replace cursor functions with pair_list functions in rlm_couchbase.c
authorNick Porter <nick@portercomputing.co.uk>
Wed, 20 Jan 2021 10:37:01 +0000 (10:37 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 21 Jan 2021 23:05:49 +0000 (23:05 +0000)
src/modules/rlm_couchbase/rlm_couchbase.c

index 02d7c4ecd9dee65868ccb5429de8acbd4a3f2120..18d039a0d70b5b923d8aa9109eb27f3482c9c7bc 100644 (file)
@@ -247,7 +247,6 @@ static unlang_action_t mod_accounting(rlm_rcode_t *p_result, module_ctx_t const
        int docfound = 0;                       /* document found toggle */
        lcb_error_t cb_error = LCB_SUCCESS;     /* couchbase error holder */
        ssize_t slen;
-       fr_cursor_t cursor;
 
 
        /* assert packet as not null */
@@ -365,11 +364,9 @@ static unlang_action_t mod_accounting(rlm_rcode_t *p_result, module_ctx_t const
        }
 
        /* loop through pairs and add to json document */
-       fr_cursor_init(&cursor, &request->request_pairs);
-
-       for (vp = fr_cursor_head(&cursor);
+       for (vp = fr_pair_list_head(&request->request_pairs);
             vp;
-            vp = fr_cursor_next(&cursor)) {
+            vp = fr_pair_list_next(&request->request_pairs, vp)) {
                /* map attribute to element */
                if (mod_attribute_to_element(vp->da->name, inst->map, &element) == 0) {
                        /* debug */