[Asterisk-code-review] res odbc: Implement a connection pool. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Jun 7 09:04:16 CDT 2016


Joshua Colp has posted comments on this change.

Change subject: res_odbc: Implement a connection pool.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/2945/2/res/res_odbc.c
File res/res_odbc.c:

PS2, Line 834: 		} else if (connection_dead(obj, class)) {
             : 			/* If the connection is dead try to grab another functional one from the
             : 			 * pool instead of trying to resurrect this one.
             : 			 */
             : 			ast_debug(2, "ODBC handle %p dead - removing\n", obj);
             : 			ao2_ref(obj, -1);
             : 			obj = NULL;
             : 			class->connection_cnt--;
> Two Questions:
1) Nope! There is no obj->parent on it at that point, when connections are in the pool there is no parent.
2) The destructor will call SQLDisconnect on it.


-- 
To view, visit https://gerrit.asterisk.org/2945
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6774bf4bac49a0b30242c76a09c403d2e856ecff
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list