Merge changes from team/russell/issue_9520
commitbeaa5e8f8a6dbb36f4cc4dc5dd284dc7ab9587f8
authorrussell <russell@614ede4d-c843-0410-af14-a771ab80d22e>
Tue, 22 Apr 2008 15:20:37 +0000 (22 15:20 +0000)
committerrussell <russell@614ede4d-c843-0410-af14-a771ab80d22e>
Tue, 22 Apr 2008 15:20:37 +0000 (22 15:20 +0000)
treedbd1513aa05a21d562ad9b2ed0746b282b7ac983
parent60c97b9a292f13af9e6eef310d142af2ab7d26eb
Merge changes from team/russell/issue_9520

These changes make sure that the reference count for sip_peer objects properly
reflects the fact that the peer is sitting in the scheduler for a scheduled
callback for qualifying peers or for expiring registrations.  Without this, it
was possible for these callbacks to happen at the same time that the peer was
being destroyed.  This was especially likely to happen with realtime peers, and
for people making use of the realtime prune CLI command.

(closes issue #9520)
Reported by: kryptolus
Committed patch by me

git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114522 614ede4d-c843-0410-af14-a771ab80d22e
channels/chan_sip.c
include/asterisk/sched.h