]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[core] fix long sql stmts may be skipped, introduced in 2e88c67c9de5452c7e442d8e7fd35...
authorAnthony Minessale <anthm@signalwire.com>
Tue, 23 Jun 2020 05:49:50 +0000 (05:49 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:00:28 +0000 (22:00 +0300)
src/switch_core_sqldb.c

index 7bf612b7d57c0ab2b61d8601dda066788f0451ad..3ce7fae8fbeb235653ff8495a57571bb8e9d5b4d 100644 (file)
@@ -790,12 +790,8 @@ static switch_status_t switch_cache_db_execute_sql_chunked(switch_cache_db_handl
                        p--;
                }
 
-               if (p <= s)
-                       break;
-
-
                status = switch_cache_db_execute_sql_real(dbh, s, err);
-               if (status != SWITCH_STATUS_SUCCESS || (err && *err)) {
+               if (p <= s || status != SWITCH_STATUS_SUCCESS || (err && *err)) {
                        break;
                }