[asterisk-commits] tilghman: branch 1.6.2 r284399 - in /branches/1.6.2: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 31 15:18:36 CDT 2010


Author: tilghman
Date: Tue Aug 31 15:18:32 2010
New Revision: 284399

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=284399
Log:
Merged revisions 284393 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r284393 | tilghman | 2010-08-31 15:13:21 -0500 (Tue, 31 Aug 2010) | 7 lines
  
  Don't send a devstate change on poke_noanswer if the state did not change.
  
  (closes issue #17741)
   Reported by: schmidts
   Patches: 
         chan_sip.c.patch uploaded by schmidts (license 1077)
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_sip.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Tue Aug 31 15:18:32 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380,283690,283880,283960,284316
+/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380,283690,283880,283960,284316,284393

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=284399&r1=284398&r2=284399
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Tue Aug 31 15:18:32 2010
@@ -23050,7 +23050,7 @@
 static int sip_poke_noanswer(const void *data)
 {
 	struct sip_peer *peer = (struct sip_peer *)data;
-	
+
 	peer->pokeexpire = -1;
 
 	if (peer->lastms > -1) {
@@ -23069,12 +23069,15 @@
 		peer->call = dialog_unref(peer->call, "unref dialog peer->call");
 		/* peer->call = sip_destroy(peer->call);*/
 	}
-	
-	peer->lastms = -1;
-	ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+
+	/* Don't send a devstate change if nothing changed. */
+	if (peer->lastms > -1) {
+		peer->lastms = -1;
+		ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
+	}
 
 	/* Try again quickly */
-	AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched, 
+	AST_SCHED_REPLACE_UNREF(peer->pokeexpire, sched,
 			DEFAULT_FREQ_NOTOK, sip_poke_peer_s, peer,
 			unref_peer(_data, "removing poke peer ref"),
 			unref_peer(peer, "removing poke peer ref"),




More information about the asterisk-commits mailing list