eliminate useless warnings generated by IAXy registrations
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Nov 2005 19:05:52 +0000 (19:05 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Nov 2005 19:05:52 +0000 (19:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7044 65c4cc65-6c06-0410-ace0-fbb531ad65f3

ChangeLog
channels/chan_iax2.c

index 6b68993..ea778b5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-11-09  Kevin P. Fleming  <kpfleming@digium.com>
+
+       * channels/chan_iax2.c (update_registry): don't complain about unspecifed registration expiration intervals, just use the minimum
+
 2005-11-08  Kevin P. Fleming  <kpfleming@digium.com>
 
        * Asterisk 1.2.0-rc1 released.
index 093a4c2..806b1d2 100755 (executable)
@@ -5660,6 +5660,9 @@ static int update_registry(char *name, struct sockaddr_in *sin, int callno, char
        /* Setup the expiry */
        if (p->expire > -1)
                ast_sched_del(sched, p->expire);
+       /* treat an unspecified refresh interval as the minimum */
+       if (!refresh)
+               refresh = min_reg_expire;
        if (refresh > max_reg_expire) {
                ast_log(LOG_NOTICE, "Restricting registration for peer '%s' to %d seconds (requested %d)\n",
                        p->name, max_reg_expire, refresh);