From: Nick Porter Date: Fri, 8 Jan 2021 18:01:40 +0000 (+0000) Subject: Replace cursor functions with pair_list functions in rlm_unix.c X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=06eeba08b0b96561622b4a9d67ec74ee38b8ab5e;p=thirdparty%2Ffreeradius-server.git Replace cursor functions with pair_list functions in rlm_unix.c --- diff --git a/src/modules/rlm_unix/rlm_unix.c b/src/modules/rlm_unix/rlm_unix.c index 8aed24fe7fb..d001bffab03 100644 --- a/src/modules/rlm_unix/rlm_unix.c +++ b/src/modules/rlm_unix/rlm_unix.c @@ -340,7 +340,6 @@ static unlang_action_t CC_HINT(nonnull) mod_accounting(rlm_rcode_t *p_result, mo { rlm_unix_t const *inst = talloc_get_type_abort_const(mctx->instance, rlm_unix_t); fr_pair_t *vp; - fr_cursor_t cursor; FILE *fp; struct utmp ut; time_t t; @@ -399,9 +398,9 @@ static unlang_action_t CC_HINT(nonnull) mod_accounting(rlm_rcode_t *p_result, mo /* * First, find the interesting attributes. */ - for (vp = fr_cursor_init(&cursor, &request->request_pairs); + for (vp = fr_pair_list_head(&request->request_pairs); vp; - vp = fr_cursor_next(&cursor)) { + vp = fr_pair_list_next(&request->request_pairs, vp)) { if (vp->da == attr_user_name) { if (vp->vp_length >= sizeof(ut.ut_name)) { memcpy(ut.ut_name, vp->vp_strvalue, sizeof(ut.ut_name));