]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Unbreak the storing of registrations for restart
authorTerry Wilson <twilson@digium.com>
Wed, 18 May 2011 20:22:36 +0000 (20:22 +0000)
committerTerry Wilson <twilson@digium.com>
Wed, 18 May 2011 20:22:36 +0000 (20:22 +0000)
The fix for issue 18882 broke retrieving non-realtime peers from the ast_db
on restart/reload. This patch tries to unbreak things while leaving the intent
of the original fix intact.
(closes issue #19318)
Reported by: remiq
Patches:
      diff.txt uploaded by twilson (license 396)
Tested by: lmadsen, remiq

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319552 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index cf2baa1e2fb6437921383aa62c1cbc57bcf9036e..9d0ea32b64d4ecc8d99ed46a9299a985ad9b7227 100644 (file)
@@ -26740,7 +26740,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str
                sip_cfg.allowsubscribe = TRUE;  /* No global ban any more */
        }
        /* If read-only RT backend, then refresh from local DB cache */
-       if (peer->host_dynamic && !sip_cfg.peer_rtupdate) {
+       if (peer->host_dynamic && (!peer->is_realtime || !sip_cfg.peer_rtupdate)) {
                reg_source_db(peer);
        }