[Asterisk-code-review] func odbc: single database connection should be optional (asterisk[13])
Alexei Gradinari
asteriskteam at digium.com
Fri May 13 12:17:59 CDT 2016
Alexei Gradinari has posted comments on this change.
Change subject: func_odbc: single database connection should be optional
......................................................................
Patch Set 3:
(1 comment)
https://gerrit.asterisk.org/#/c/2800/3/funcs/func_odbc.c
File funcs/func_odbc.c:
PS3, Line 1833:
: if (single_db_connection) {
: ao2_ref(dsns, -1);
: }
:
: 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 = 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 decided to remove unreferencing and reallocating dsns container on reload
is not freed only once, when we 1st time switch from single to multi.
--
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: 3
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: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list