Merged revisions 322981 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Fri, 10 Jun 2011 15:30:50 +0000 (15:30 +0000)
committerTerry Wilson <twilson@digium.com>
Fri, 10 Jun 2011 15:30:50 +0000 (15:30 +0000)
commit58ca56029173b034485fcef1a23628998927db3f
tree13ee966a6b5258f99a41cf5af310660c892e5620
parent6017de62929b8441bf980ae5a55c9aeb585a654a
Merged revisions 322981 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r322981 | twilson | 2011-06-10 08:29:00 -0700 (Fri, 10 Jun 2011) | 11 lines

  Avoid a DB1 infinite loop bug

  Explicity check the last entry in the DB and make sure that we don't iterate
  past it. Since there can be no duplicates, this just makes sure that we stop
  after matching the last key.

  This patch also refactors the code to get away from some code duplication. A
  previous patch added many astdb tests and this patch passed them.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@322982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/db.c