]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct spelling of tmpl_dcursor_clear
authorNick Porter <nick@portercomputing.co.uk>
Mon, 8 Aug 2022 09:49:13 +0000 (10:49 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 8 Aug 2022 09:51:39 +0000 (10:51 +0100)
13 files changed:
src/lib/server/cond_eval.c
src/lib/server/map.c
src/lib/server/map_async.c
src/lib/server/tmpl.h
src/lib/server/tmpl_dcursor.c
src/lib/server/tmpl_dcursor.h
src/lib/server/tmpl_dcursor_tests.c
src/lib/server/tmpl_eval.c
src/lib/unlang/edit.c
src/lib/unlang/xlat_builtin.c
src/lib/unlang/xlat_expr.c
src/modules/rlm_linelog/rlm_linelog.c
src/modules/rlm_smtp/rlm_smtp.c

index 6e68dabe34572ecc55c1186d60802bca2549a473..154d24470c9f0b16ca2f6bd4a4b96e455e6d70e5 100644 (file)
@@ -549,7 +549,7 @@ static bool cond_compare_attrs(request_t *request, fr_value_box_t *lhs, map_t co
                if (rcode != 0) break;
        }
 
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return (rcode == 1);
 }
 
@@ -583,7 +583,7 @@ static bool cond_compare_virtual(request_t *request, map_t const *map)
                if (rcode != 0) break;
        }
 
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return (rcode == 1);
 }
 
@@ -806,7 +806,7 @@ check_attrs:
                        continue;
                }
 
-               tmpl_dursor_clear(&cc);
+               tmpl_dcursor_clear(&cc);
        }
                break;
 
index bfc116dd5c6cf6dffb46a4be6accbcde3f65e3e1..90b7d1f509124cc05316eda50a5cdd7246f5d5a7 100644 (file)
@@ -2182,7 +2182,7 @@ update:
        fr_assert(fr_pair_list_empty(&src_list));
 
 finish:
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        talloc_free(tmp_ctx);
        return rcode;
 }
index e40bf4a6f7a548db2f11258cfce7dc6ddd14bdf2..64a35759b8331ec8a1f1b31e892165f979152ab3 100644 (file)
@@ -568,20 +568,20 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
                         *      we should delete all LHS attributes.
                         */
                        if (mutated->op == T_OP_SET) n = list_mod_delete_afrom_map(ctx, original, mutated);
-                       tmpl_dursor_clear(&cc_attr);
+                       tmpl_dcursor_clear(&cc_attr);
                        goto finish;
 
                case -2:                /* No matching list */
                case -3:                /* No request context */
                case -4:                /* memory allocation error */
                        RPEDEBUG("Failed resolving attribute source");
-                       tmpl_dursor_clear(&cc_attr);
+                       tmpl_dcursor_clear(&cc_attr);
                        goto error;
                }
 
                n = list_mod_generic_afrom_map(ctx, original, mutated);
                if (!n) {
-                       tmpl_dursor_clear(&cc_attr);
+                       tmpl_dcursor_clear(&cc_attr);
                        goto error;
                }
 
@@ -593,7 +593,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
                        attr_error:
                                fr_dcursor_head(&values);
                                fr_dcursor_free_list(&values);
-                               tmpl_dursor_clear(&cc_attr);
+                               tmpl_dcursor_clear(&cc_attr);
                                goto error;
                        }
 
@@ -611,7 +611,7 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
                        fr_dcursor_append(&values, n_vb);
                } while ((vp = fr_dcursor_next(&from)));
 
-               tmpl_dursor_clear(&cc_attr);
+               tmpl_dcursor_clear(&cc_attr);
        }
                break;
 
@@ -1287,6 +1287,6 @@ int map_list_mod_apply(request_t *request, vp_list_mod_t const *vlm)
        }
 
 finish:
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return rcode;
 }
index b6eafc1968bbc32c79f243d9cb8b592cb92e3665..29d1922fb6c2fbbc46b6beb95117b748c8c919e2 100644 (file)
@@ -767,7 +767,7 @@ void tmpl_verify(char const *file, int line, tmpl_t const *vpt);
        vp = tmpl_cursor_next(&cursor, &list)) {
        // Do something
    }
-   tmpl_dursor_clear(&cc);
+   tmpl_dcursor_clear(&cc);
  @endcode
  *
  * @param _request to locate the list in.
index 92294c871e24eac0d25fe6ef4c63214c560c2e17..2148b8211f0c4ce854ed4ab7cd37ed92f3cc2d9c 100644 (file)
@@ -408,7 +408,7 @@ fr_pair_t *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc,
        if (tmpl_request_ptr(&request, tmpl_request(vpt)) < 0) {
                if (err) *err = -3;
        error:
-               memset(cc, 0, sizeof(*cc));     /* so tmpl_dursor_clear doesn't explode */
+               memset(cc, 0, sizeof(*cc));     /* so tmpl_dcursor_clear doesn't explode */
                return NULL;
        }
 
@@ -433,7 +433,7 @@ fr_pair_t *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc,
 /** Clear any temporary state allocations
  *
  */
-void tmpl_dursor_clear(tmpl_dcursor_ctx_t *cc)
+void tmpl_dcursor_clear(tmpl_dcursor_ctx_t *cc)
 {
        /*
         *      If the pool wasn't created, nothing was talloc'd which
index 6e798a6094ea59a864e8d1add3981bcbe60dff0a..8445539e37247cfa3a19dc4ef703bed38cb318d1 100644 (file)
@@ -90,4 +90,4 @@ fr_pair_t             *tmpl_dcursor_init(int *err, TALLOC_CTX *ctx, tmpl_dcursor_ctx_t *cc,
                                           fr_dcursor_t *cursor, request_t *request,
                                           tmpl_t const *vpt);
 
-void                   tmpl_dursor_clear(tmpl_dcursor_ctx_t *cc);
+void                   tmpl_dcursor_clear(tmpl_dcursor_ctx_t *cc);
index f8166a538ee35159a7e9444de9d0ab6022d8e213..bfe1b73275c77eb744183d22fe988e4d7950affa 100644 (file)
@@ -115,7 +115,7 @@ static request_t *request_fake_alloc(void)
 #define test_end \
        vp = fr_dcursor_next(&cursor); \
        TEST_CHECK(vp == NULL); \
-       tmpl_dursor_clear(&cc); \
+       tmpl_dcursor_clear(&cc); \
        TEST_CHECK_RET(talloc_free(request), 0)
 
 /*
index 528d683d61e4d31f7e75cac176e270004a36764a..5854c018d1bb0764343a2364deed9d5dd72fd3a2 100644 (file)
@@ -920,7 +920,7 @@ int tmpl_copy_pairs(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, tm
                }
                fr_pair_append(out, vp);
        }
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
 
        return err;
 }
@@ -971,7 +971,7 @@ int tmpl_copy_pair_children(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *req
                }
        }
 done:
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
 
        return err;
 }
@@ -1001,7 +1001,7 @@ int tmpl_find_vp(fr_pair_t **out, request_t *request, tmpl_t const *vpt)
        TMPL_VERIFY(vpt);
 
        vp = tmpl_dcursor_init(&err, request, &cc, &cursor, request, vpt);
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
 
        if (out) *out = vp;
 
@@ -1033,7 +1033,7 @@ int tmpl_find_or_add_vp(fr_pair_t **out, request_t *request, tmpl_t const *vpt)
        *out = NULL;
 
        vp = tmpl_dcursor_init(&err, NULL, &cc, &cursor, request, vpt);
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
 
        switch (err) {
        case 0:
@@ -1383,7 +1383,7 @@ done:
        }
 
 fail:
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return ret;
 }
 
index 0ec4ac3490306aa1d35131766704e0e56d6755e1..fb1448dc95e8ade8bf785d410e64dc72515b1796 100644 (file)
@@ -251,14 +251,14 @@ static int remove_vps(request_t *request, edit_map_t *current)
                fr_assert(list != NULL);
 
                if (fr_edit_list_pair_delete(current->el, list, vp) < 0) {
-                       tmpl_dursor_clear(&cc);
+                       tmpl_dcursor_clear(&cc);
                        return -1;
                }
 
                vp = next;
        }
 
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return 0;
 }
 
index 75bd11fb3553288b02e951f279194cbdb38199a6..83cd8efac08727dfc58d9e2fac59cedc8fa3db97 100644 (file)
@@ -1131,7 +1131,7 @@ static xlat_action_t xlat_func_debug_attr(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcur
             vp = fr_dcursor_next(&cursor)) {
                xlat_debug_attr_vp(request, vp, vpt);
        }
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        REXDENT();
 
        talloc_free(vpt);
@@ -2586,14 +2586,14 @@ static xlat_action_t xlat_func_pairs(TALLOC_CTX *ctx, fr_dcursor_t *out,
                if (unlikely(fr_pair_aprint(vb, &buff, NULL, vp) < 0)) {
                        RPEDEBUG("Failed printing pair");
                        talloc_free(vb);
-                       tmpl_dursor_clear(&cc);
+                       tmpl_dcursor_clear(&cc);
                        return XLAT_ACTION_FAIL;
                }
 
                fr_value_box_bstrdup_buffer_shallow(NULL, vb, NULL, buff, false);
                fr_dcursor_append(out, vb);
        }
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        talloc_free(vpt);
 
        return XLAT_ACTION_DONE;
@@ -3668,7 +3668,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                len = tp_encode->func(&FR_DBUFF_TMP(p, end), &cursor, encode_ctx);
                if (len < 0) {
                        RPEDEBUG("Protocol encoding failed");
-                       tmpl_dursor_clear(&cc);
+                       tmpl_dcursor_clear(&cc);
                        talloc_free(vpt);
                        return XLAT_ACTION_FAIL;
                }
@@ -3677,7 +3677,7 @@ static xlat_action_t protocol_encode_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
                p += len;
        }
 
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        talloc_free(vpt);
 
        /*
index 6e87ed0952fe5b1167adf4880afd08f3091c0d33..c3ba9ada926a4dbdf22d41a1dfca8a6c478a9dab 100644 (file)
@@ -1508,7 +1508,7 @@ static xlat_action_t xlat_attr_exists(TALLOC_CTX *ctx, fr_dcursor_t *out,
        }
 
        if (do_free) talloc_const_free(vpt);
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        fr_dcursor_append(out, dst);
        return XLAT_ACTION_DONE;
 }
index 5861791f24e55993e8ec74198a58bf56f10f7af8..6512e10cbc9bdfc4dc0ec0d42537a99ba67b262f 100644 (file)
@@ -601,7 +601,7 @@ build_vector:
                                vector[i].iov_len = inst->delimiter_len;
                        }
                }
-               tmpl_dursor_clear(&cc);
+               tmpl_dcursor_clear(&cc);
                vector_p = vector;
                vector_len = i;
        }
index 487f84ab151884a094ac3ab54b03d45c6c19592e..5be4ec89fe597aef79815dbe3e95188f29a7cb61 100644 (file)
@@ -247,7 +247,7 @@ static int tmpl_attr_to_slist(fr_mail_ctx_t *uctx, struct curl_slist **out, tmpl
        }
 
        /* Return the number of elements which were found */
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return count;
 }
 
@@ -301,7 +301,7 @@ static ssize_t tmpl_attr_to_sbuff(fr_mail_ctx_t *uctx, fr_sbuff_t *out, tmpl_t c
                        copied += fr_sbuff_in_strcpy(out, delimiter);
                }
        }
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return copied;
 }
 
@@ -418,7 +418,7 @@ static int tmpl_attr_to_attachment(fr_mail_ctx_t *uctx, curl_mime *mime, const t
                attachments_set += str_to_attachments(uctx, mime, vp->vp_strvalue, vp->vp_length, path_buffer, m);
        }
 
-       tmpl_dursor_clear(&cc);
+       tmpl_dcursor_clear(&cc);
        return attachments_set;
 }