]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Handle the return values of realtime updates and stores more accurately.
authorMark Michelson <mmichelson@digium.com>
Fri, 14 Mar 2014 18:10:47 +0000 (18:10 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 14 Mar 2014 18:10:47 +0000 (18:10 +0000)
commit0d0c99489cd6b36de327294c7c710a71d18b2d71
treee57fc5114ac7e98401e9b21c864a959970e4b1c0
parent60a527ce73988e482035ccb16d8098b164b044d3
Handle the return values of realtime updates and stores more accurately.

Realtime backends' update and store callbacks return the number of rows affected,
or -1 if there was a failure. There were a couple of issues:

* The config API was treating 0 as a successful return, and positive values as
  a failure. Now the config API treats anything >= 0 as a success.

* res_sorcery_realtime was treating 0 as a successful return from the store
  procedure, and any positive values as a failure. Now sorcery treats anything
  > 0 as a success. It still considers 0 a "failure" since there is no change
  to report to observers.

Review: https://reviewboard.asterisk.org/r/3341

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