operator != also works between booleans...
authorLuigi Rizzo <rizzo@icir.org>
Wed, 11 Oct 2006 23:26:44 +0000 (23:26 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Wed, 11 Oct 2006 23:26:44 +0000 (23:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44900 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 7057c81..9e3f8c1 100644 (file)
@@ -11687,8 +11687,7 @@ static void handle_response_peerpoke(struct sip_pvt *p, int resp, struct sip_req
        was_reachable = peer->lastms > 0 && peer->lastms <= peer->maxms;
        is_reachable = pingtime <= peer->maxms;
        statechanged = peer->lastms == 0 /* yes, unknown before */
-               || ( !was_reachable && is_reachable)
-               || ( was_reachable  && !is_reachable );
+               || was_reachable != is_reachable;
 
        peer->lastms = pingtime;
        peer->call = NULL;