[asterisk-dev] [Code Review] Replace Berkeley DB astdb with SQLite3
Terry Wilson
reviewboard at asterisk.org
Tue Jun 14 11:19:19 CDT 2011
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, lines 51-53
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line51>
> >
> > Can the system header be moved above, or is order important here? We generally include all system headers first, followed by Asterisk headers.
> >
> > If ordering is important, please add a comment to that effect, noting the specific Asterisk header.
Shouldn't matter. I can move it.
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, line 132
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line132>
> >
> > This statement should have an additional '/' between the wildcard and the argument specifier.
I don't think so. The value that is queried for has the '/' in it. I tried to keep the logic as close to the original as possible.
if (a->argc == 3) {
/* Key only */
snprintf(suffix, sizeof(suffix), "/%s", a->argv[2]);
} else {
return CLI_SHOWUSAGE;
}
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, line 991
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line991>
> >
> > As this interface is marked experimental, if we're using a system library and not including sqlite3 directly within the source, this constant will need to be verified in the current system library.
Actually, I should be able to take it out entirely as I am overriding with the NOMUTEX when I open the database anyway.
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, line 268
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line268>
> >
> > Because this boolean statement requires a bit of time to digest, I would suggest changing the st variable to 'dont_care' as we do in other code to show that we're not using the results of the system call, just the return value.
Ok.
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, lines 318-321
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line318>
> >
> > errmsg, if defined, needs to be free'd before returning.
Doh, I knew that and even told myself to remember. Forgot anyway! Thanks.
> On 2011-06-14 11:04:38, Tilghman Lesher wrote:
> > /trunk/main/db.c, line 973
> > <https://reviewboard.asterisk.org/r/1269/diff/1/?file=16882#file16882line973>
> >
> > If your debug level was 10, how much does this spew?
Just up to once per second. I added it just so I could prove to myself that it was in fact working (when it wasn't). I can take it out.
- Terry
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1269/#review3719
-----------------------------------------------------------
On 2011-06-13 22:56:50, Terry Wilson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1269/
> -----------------------------------------------------------
>
> (Updated 2011-06-13 22:56:50)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> There have been a couple of bugs reported lately against the Berkeley DB version that Asterisk uses for its internal database. These bugs have been tracked to the actual Berkeley code Asterisk uses, which is very very old and unmaintained. This patch replaces the Berkeley code with SQLite3 while maintaining exactly the same API. If there is no sqlite3 version of the database already and there is a Berkeley DB version, it automatically converts the old database to the new format.
>
> If this goes in, I would then like to update Olle's patch for Realtime support for astdb as well and get that in.
>
>
> Diffs
> -----
>
> /configure UNKNOWN
> /trunk/configure.ac 323323
> /trunk/main/Makefile 323323
> /trunk/main/db.c 323323
> /trunk/tests/test_db.c 323323
>
> Diff: https://reviewboard.asterisk.org/r/1269/diff
>
>
> Testing
> -------
>
> All astdb tests pass and I have tested converting several astdb databases.
>
>
> Thanks,
>
> Terry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110614/3e3f0e5a/attachment.htm>
More information about the asterisk-dev
mailing list