Fix IAX2 registration time. We want to set reg->refresh to the new value only if its lower not if its higher. (bug 1955)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
James Golovich 22 years ago
parent 8e2e53c987
commit 201849fb42

@ -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)); memcpy(&reg->us, &us, sizeof(reg->us));
reg->messages = ies->msgcount; reg->messages = ies->msgcount;
if (refresh && (reg->refresh < refresh)) { if (refresh && (reg->refresh > refresh)) {
/* Refresh faster if necessary */ /* Refresh faster if necessary */
reg->refresh = refresh; reg->refresh = refresh;
if (reg->expire > -1) if (reg->expire > -1)

Loading…
Cancel
Save