Pre-Submission Checklist

Type Of Change

Checklist:

Description

Spotted this ERRORs on kamailio restart:

ERROR: <core> [db.c:481]: db_use_table(): invalid connection parameter
ERROR: userblocklist [db.c:123]: db_reload_source(): cannot use db table 'globalblocklist'
ERROR: userblocklist [userblocklist.c:425]: load_source(): cannot load source from 'globalblocklist

Debugging it further, seen that the above ERRORs appear on check_allowlist() function fixup. This was happening because db connection is closed in mod_init and re-done in child_init. But the fixups happen before child_init and they need db connection.

Decided to not close the db connection after mod_init because they are later, first closed and then re-opened, in each child. Figured out this fix after checked where each function of db_userblocklist.c is used.

ERRORs no longer appear on restart.

Thank you,
Stefan


You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3102

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3102@github.com>