[Asterisk-code-review] func odbc: single database connection should be optional (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Thu May 19 16:30:02 CDT 2016
Richard Mudgett has posted comments on this change.
Change subject: func_odbc: single database connection should be optional
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.asterisk.org/#/c/2800/4/funcs/func_odbc.c
File funcs/func_odbc.c:
PS4, Line 1833: if (cfg && (s = ast_variable_retrieve(cfg, "general", "single_db_connection"))) {
: single_db_connection = ast_true(s);
: } else {
: single_db_connection = DEFAULT_SINGLE_DB_CONNECTION;
: }
:
: if (single_db_connection && !dsns) {
: dsns = ao2_container_alloc(DSN_BUCKETS, dsn_hash, dsn_cmp);
: if (!dsns) {
: ast_log(LOG_ERROR, "Could not initialize DSN container\n");
: return 0;
: }
: ast_log(LOG_NOTICE, "Single database connection per DSN\n");
: }
> I didn't find any documentation about locking functions.
Examples are scattered throughout the code. Look at usage of AST_RWLOCK_DEFINE_STATIC() with ast_rwlock_rdlock(), ast_rwlock_wrlock(), and ast_rwlock_unlock().
--
To view, visit https://gerrit.asterisk.org/2800
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I57d990616c957dabf7597dea5d5c3148f459dfb6
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list