]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Make it so that if a peer is determined to be unreachable using qualify their devices...
authorJoshua Colp <jcolp@digium.com>
Tue, 6 Nov 2007 17:08:05 +0000 (17:08 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 6 Nov 2007 17:08:05 +0000 (17:08 +0000)
(closes issue #11006)
Reported by: pj

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

channels/chan_sip.c

index 23fe8f907d4e590c73739153913ea1d17744a2b4..e444c1fcff958ab470c4aa3946222e887acfbd78 100644 (file)
@@ -15652,7 +15652,7 @@ static int sip_devicestate(void *data)
                        else if (p->call_limit && p->inUse)
                                /* Not busy, but we do have a call */
                                res = AST_DEVICE_INUSE;
-                       else if (p->maxms && (p->lastms > p->maxms)) 
+                       else if (p->maxms && ((p->lastms > p->maxms) || (p->lastms < 0))) 
                                /* We don't have a call. Are we reachable at all? Requires qualify= */
                                res = AST_DEVICE_UNAVAILABLE;
                        else    /* Default reply if we're registered and have no other data */