]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If no rows are affected output zero
authorNick Porter <nick@portercomputing.co.uk>
Thu, 21 Aug 2025 10:56:50 +0000 (11:56 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 21 Aug 2025 10:56:50 +0000 (11:56 +0100)
Rather than no boxes, which just results in warnings when assigning the
xlat output to an attribute

src/modules/rlm_sql/rlm_sql.c

index ed738256860053905ee24083f283501f0911f1ef..20bd3fed677b9971dc85c6698563f9fa33e7c6b1 100644 (file)
@@ -468,7 +468,7 @@ static xlat_action_t sql_xlat_query_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, x
        numaffected = (inst->driver->sql_affected_rows)(query_ctx, &inst->config);
        if (numaffected < 1) {
                RDEBUG2("SQL query affected no rows");
-               goto finish;
+               numaffected = 0;
        }
 
        MEM(vb = fr_value_box_alloc_null(ctx));