mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
This patch fixes an issue in the ODBC Realtime engine where Asterisk incorrectly falls back to the next configured backend when the current one returns SQL_NO_DATA (i.e., no record found). This is a logical error and performance risk in multi-backend configurations. Solution: Introduced CONFIG_RT_NOT_FOUND ((void *)-1) as a special return marker. ODBC Realtime backend now return CONFIG_RT_NOT_FOUND when no data is found. Core engine stops iterating on this marker, avoiding unnecessary fallback. Notes: Other Realtime backends (PostgreSQL, LDAP, etc.) can be updated similarly. This patch only covers ODBC. Fixes: #1305