Fix IAX2 registration time. We want to set reg->refresh to the new value only if...
authorJames Golovich <james@gnuinter.net>
Thu, 1 Jul 2004 04:04:30 +0000 (04:04 +0000)
committerJames Golovich <james@gnuinter.net>
Thu, 1 Jul 2004 04:04:30 +0000 (04:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3369 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index 1196949..188afff 100755 (executable)
@@ -4035,7 +4035,7 @@ static int iax2_ack_registry(struct iax_ies *ies, struct sockaddr_in *sin, int c
        }
        memcpy(&reg->us, &us, sizeof(reg->us));
        reg->messages = ies->msgcount;
-       if (refresh && (reg->refresh < refresh)) {
+       if (refresh && (reg->refresh > refresh)) {
                /* Refresh faster if necessary */
                reg->refresh = refresh;
                if (reg->expire > -1)