]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add REXDENT, which would be useful
authorAlan T. DeKok <aland@freeradius.org>
Fri, 30 Jun 2017 15:37:43 +0000 (11:37 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 30 Jun 2017 15:37:43 +0000 (11:37 -0400)
src/modules/rlm_csv/rlm_csv.c

index ff70b874f5ff0b708383656059c8bc9f76210293..2494d279f3d1da1385df57961ddbfd8adc79f38c 100644 (file)
@@ -500,6 +500,7 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, REQUEST
                 */
                if (map->rhs->type != TMPL_TYPE_UNPARSED) {
                        if (tmpl_aexpand(request, &field_name, request, map->rhs, NULL, NULL) < 0) {
+                               REXDENT();
                                RDEBUG("Failed expanding RHS at %s", map->lhs->name);
                                rcode = RLM_MODULE_FAIL;
                                goto finish;
@@ -513,6 +514,7 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, REQUEST
                if (field_name != map->rhs->name) talloc_free(field_name);
 
                if (field < 0) {
+                       REXDENT();
                        RDEBUG("No such field name %s", map->rhs->name);
                        rcode = RLM_MODULE_FAIL;
                        goto finish;
@@ -523,11 +525,14 @@ static rlm_rcode_t mod_map_proc(void *mod_inst, UNUSED void *proc_inst, REQUEST
                 *      create the VP and add it to the map.
                 */
                if (map_to_request(request, map, csv_map_getvalue, e->data[field]) < 0) {
+                       REXDENT();
                        rcode = RLM_MODULE_FAIL;
                        goto finish;
                }
        }
 
+       REXDENT();
+
 finish:
        talloc_free(key_str);
        return rcode;