Ticket #43 (closed defect: fixed)
sqlite3 authreg support for jabberd2
| Reported by: | smoku | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | storage |
| Version: | 2.1 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
This patch against jabberd-2.0s11 contains a fixed and extended version of authreg_sqlite.c. The changes in detail are:
- Fix the leak of unfinished sqlite3 statement handles. This was the
reason for requiring separate database files for authreg and storage, and also prevented the creation of more than one account without restarting c2s in between.
- Create the prepared statement for each operation only once and cache it
in the module data structure.
- Factor out the preparing of SQL statements and related error handling
and logging.
The patch also contains the database schema file for SQLite and adds the needed pieces to the build system and the config file templates.