Fix SIP/IAX caching (bug #3671)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-03-24 05:02:49 +00:00
parent 070f50ccc7
commit e7b18536c4
2 changed files with 8 additions and 1 deletions

View File

@@ -1292,6 +1292,9 @@ static struct sip_peer *realtime_peer(const char *peername, struct sockaddr_in *
if(ast_test_flag((&global_flags_page2), SIP_PAGE2_RTCACHEFRIENDS)) {
ast_copy_flags((&peer->flags_page2),(&global_flags_page2), SIP_PAGE2_RTAUTOCLEAR|SIP_PAGE2_RTCACHEFRIENDS);
if(ast_test_flag((&global_flags_page2), SIP_PAGE2_RTAUTOCLEAR)) {
if (peer->expire > -1) {
ast_sched_del(sched, peer->expire);
}
peer->expire = ast_sched_add(sched, (global_rtautoclear) * 1000, expire_register, (void *)peer);
}
ASTOBJ_CONTAINER_LINK(&peerl,peer);