]> git.ipfire.org Git - thirdparty/asterisk.git/commit
realtime: Fix ast_update2_realtime() on raspberry pi.
authorWalter Doekes <walter+asterisk@wjd.nu>
Wed, 12 Feb 2014 08:18:37 +0000 (08:18 +0000)
committerWalter Doekes <walter+asterisk@wjd.nu>
Wed, 12 Feb 2014 08:18:37 +0000 (08:18 +0000)
commita36b55313f0d79752ba2890105b7e1dc58b36464
tree84a0f1ac15eab747d20c4ba495b29d1347e1046f
parent2b080d139b30d1858b97b98bc5451017d32b001b
realtime: Fix ast_update2_realtime() on raspberry pi.

The old code depended on undefined va_arg behaviour: calling a function
twice with the same va_list parameter and expecting it to continue where
it left off. The changed code behaves like the manpage says it should.

Also added a bunch of early returns to trap errors (e.g. OOM) instead of
crashing.

The problem was found by Julian Lyndon-Smith. The deviant behaviour on
the raspberry PI also uncovered another bug (fixed in r407875) in the
res_config_pgsql.so driver.

Reported by: jmls
Tested by: jmls
Review: https://reviewboard.asterisk.org/r/3201/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/config.c