]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check proper return code
authorAlan T. DeKok <aland@freeradius.org>
Tue, 3 Mar 2026 22:04:44 +0000 (17:04 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 3 Mar 2026 22:05:20 +0000 (17:05 -0500)
the function returns 0 for "more data", and 1 for "no data",
which is different from the other APIs

src/modules/rlm_sql/drivers/rlm_sql_null/rlm_sql_null.c

index c71ad1215eaf402fadce6e00abe17bbdb04c6865..720d01fe50c7e468875a4edc8258248518c3ce2f 100644 (file)
@@ -53,7 +53,7 @@ static void sql_trunk_request_mux(UNUSED fr_event_list_t *el, trunk_connection_t
        request_t       *request;
        fr_sql_query_t  *query_ctx;
 
-       while (trunk_connection_pop_request(&treq, tconn) != 0) {
+       while (trunk_connection_pop_request(&treq, tconn) == 0) {
                if (!treq) return;
 
                query_ctx = talloc_get_type_abort(treq->preq, fr_sql_query_t);