[asterisk-dev] [Code Review] Adding PQclear calls to res_config_pgsql

jrose reviewboard at asterisk.org
Wed Jun 15 08:13:29 CDT 2011

This is an automatically generated e-mail. To reply, visit:

(Updated 2011-06-15 08:13:29.282605)

Review request for Asterisk Developers, Russell Bryant and David Vossel.


This patch runs PQclear a number of times on PGresult objects in situations where functions previously would have returned without clearing the PGresult object.  Also, some PQclear statements that were already in the code have been moved to occur before the result is unlocked.  I don't know if this is a necessary change since presumably at that point the PGresult isn't going to be used anymore anyway, but I don't see it as likely to hurt anything either.  I suppose if it doesn't really help anything though, we could undo that change since it would just be adding one more command of holding a lock.

The reporter seems to have worked in this area a good bit.

This addresses bug 19245.


  /branches/1.8/res/res_config_pgsql.c 323454 

Diff: https://reviewboard.asterisk.org/r/1270/diff

Testing (updated)

Testing was fairly rudimentary.  I applied the patch (by hand because the reporter's submission wouldn't apply.  For some reason.), switched my extconfig.conf to use pgsql for the connection and set res_pgsql.conf for my pgsql database and user and made sure my realtime peers still worked without being broken.  It didn't break under the stuff I put it through and all of these changes seem rather tame.  But locking is involved, so I decided to go ahead and wait for review before committing it, especially since it's not a critical issue.

My testing was mostly based on realtime peers and involved some bad database changes and some basic calling/registering to make sure nothing exploded.  I'll keep testing this throughout the rest of the day and a little tomorrow morning and report back if I find anything wrong.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110615/6496164c/attachment.htm>

More information about the asterisk-dev mailing list