Clean up use of va_end/va_args in res_config_mysql
authorMatthew Jordan <mjordan@digium.com>
Mon, 25 Feb 2013 12:51:24 +0000 (12:51 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 25 Feb 2013 12:51:24 +0000 (12:51 +0000)
commit9ad3e219c4aed1d41e6d3af0f2b5d115664920c5
treeeae635b1de81122cf6fdac9cbadd01b862ac656e
parentb34479ad37cf32f9b87c5de55ab12e9b5d7423d0
Clean up use of va_end/va_args in res_config_mysql

There were several problems using variadic argument macros in res_config_mysql.
 * Improper use of va_end. Multiple calls to va_end were possible resulting in
   an unbalanced matching of va_start/va_end.
 * Calls to va_arg after a possible encounter of a SENTINEL value.

This patch corrects those errors.

(closes issue ASTERISK-19451)
Reported by: wdoekes
patches:
  ASTERISK-19451-1.8--2.diff uploaded by wdoekes (License 5674)
........

Merged revisions 382021 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 382022 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
addons/res_config_mysql.c