[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ SEMANAGE 3 ] Common database code


This patch merges the handling of the default database with transaction management (enter_ro/exit_ro/exit_rw), and cache management, and puts that in common (polymorphed) code - database.c. It changes relay functions and internal invocation to use this code. In order to do that, the cache() function was exposed in the database interface, and now it must be called before other functionality dealing with records is used (called internally, of course).

Also, cleans up includes for relay functions (and removes unnecessary and obsolete defines of database backend - those relays should be backend independent).

Benefits:
- transaction enter/exit code is now shared for all databases, and can be easily changed - this also removes duplicate code, and makes the per-backend database code simpler - no need to write things like get_rtable/flush/drop_cache in the default database, which make no sense - Note that the per-backend dbase functions are now reentrant-safe, which means that I can layer one on top of another if I want to - this still doesn't let me call other database functions from an iterate() handler, but I think it might get us closer to this goal.

Attachment: libsemanage.dbase_common.diff.bz2
Description: application/bzip



This mailing list archive is a service of Copilot Consulting.