#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) #### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number) #### Description Move permissions module to work with hash tables instead of directly working with lists. Use locks to cover these hash tables. This allows to avoid using crutches alike 0039c50e83916, and gives a race-free usage of tables regardless the amount of data inserted into tables and regardless how many competitive reloads are pending at a time (e.g. 2-3 RPC commands sent at a time to reload same tables). Use hash indexes for a quicker lookup in buckets. Improve the mechanism of duplicate entries detection, use: the source ip, ruri pattern, from pattern and the protocol to detect existing similar entries. Add more safety checks in functions manipulating hash tables, like checking NULL pointers, empty patterns for matching purposes etc. Align return values in trusted/hash implementations so that return values are everywhere considered in the similar way (everything != 0 is considered as failure, 0 is considered as fine). Split tables allocation and initialization. Add destruction handlers for tables instead of manually handling entries freeing. Some other minor improvements. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/4539 -- Commit Summary -- * permissions: remove the permissions reload rework * permissions: hash header, remove dangling declarations * permissions: support locked tables * permissions: module rework to support locks * permissions: remove unsed hash functions -- File Changes -- M src/modules/permissions/hash.c (566) M src/modules/permissions/hash.h (64) M src/modules/permissions/rpc.c (18) M src/modules/permissions/trusted.c (143) M src/modules/permissions/trusted.h (11) -- Patch Links -- https://github.com/kamailio/kamailio/pull/4539.patch https://github.com/kamailio/kamailio/pull/4539.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/4539 You are receiving this because you are subscribed to this thread. Message ID: <kamailio/kamailio/pull/[email protected]>
_______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
