[asterisk-commits] jpeeler: trunk r294735 - in /trunk: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 11 16:01:21 CST 2010


Author: jpeeler
Date: Thu Nov 11 16:01:01 2010
New Revision: 294735

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

................
  r294734 | jpeeler | 2010-11-11 15:58:25 -0600 (Thu, 11 Nov 2010) | 32 lines
  
  Merged revisions 294733 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r294733 | jpeeler | 2010-11-11 15:57:22 -0600 (Thu, 11 Nov 2010) | 25 lines
    
    Merged revisions 294688 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r294688 | jpeeler | 2010-11-11 15:12:27 -0600 (Thu, 11 Nov 2010) | 18 lines
      
      Fix problem with qualify option packets for realtime peers never stopping.
      
      The option packets not only never stopped, but if a realtime peer was not in
      the peer list multiple options dialogs could accumulate over time. This
      scenario has the potential to progress to the point of saturating a link just
      from options packets. The fix was to ensure that the poke scheduler checks to
      see if a peer is in the peer list before continuing to poke. The reason a peer
      must be in the peer list to be able to properly manage an options dialog is
      because otherwise the call pointer is lost when the peer is regenerated from
      the database, which is how existing qualify dialogs are detected.
      
      (closes issue #16382)
      (closes issue #17779)
      Reported by: lftsy
      Patches: 
            bug16382-3.patch uploaded by jpeeler (license 325)
      Tested by: zerohalo
    ........
  ................
................

Modified:
    trunk/   (props changed)
    trunk/channels/chan_sip.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=294735&r1=294734&r2=294735
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Thu Nov 11 16:01:01 2010
@@ -2646,6 +2646,9 @@
 static int peer_is_marked(void *peerobj, void *arg, int flags)
 {
 	struct sip_peer *peer = peerobj;
+	if (peer->the_mark && peer->pokeexpire != -1) {
+		AST_SCHED_DEL(sched, peer->pokeexpire);
+	}
 	return peer->the_mark ? CMP_MATCH : 0;
 }
 
@@ -12922,11 +12925,22 @@
 static int sip_poke_peer_s(const void *data)
 {
 	struct sip_peer *peer = (struct sip_peer *)data;
+	struct sip_peer *foundpeer;
 
 	peer->pokeexpire = -1;
 
+	foundpeer = ao2_find(peers, peer, OBJ_POINTER);
+	if (!foundpeer) {
+		unref_peer(peer, "removing poke peer ref");
+		return 0;
+	} else if (foundpeer->name != peer->name) {
+		unref_peer(foundpeer, "removing above peer ref");
+		unref_peer(peer, "removing poke peer ref");
+		return 0;
+	}
+
+	unref_peer(foundpeer, "removing above peer ref");
 	sip_poke_peer(peer, 0);
-
 	unref_peer(peer, "removing poke peer ref");
 
 	return 0;




More information about the asterisk-commits mailing list