[asterisk-commits] russell: branch russell/iax2_poke_fix r87645 - /team/russell/iax2_poke_fix/ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 30 14:28:21 CDT 2007


Author: russell
Date: Tue Oct 30 14:28:20 2007
New Revision: 87645

URL: http://svn.digium.com/view/asterisk?view=rev&rev=87645
Log:
remove some notes to myself, and ensure that the scheduler id is set to -1
after being removed

Modified:
    team/russell/iax2_poke_fix/channels/chan_iax2.c

Modified: team/russell/iax2_poke_fix/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_poke_fix/channels/chan_iax2.c?view=diff&rev=87645&r1=87644&r2=87645
==============================================================================
--- team/russell/iax2_poke_fix/channels/chan_iax2.c (original)
+++ team/russell/iax2_poke_fix/channels/chan_iax2.c Tue Oct 30 14:28:20 2007
@@ -31,15 +31,6 @@
 /*** MODULEINFO
 	<use>zaptel</use>
  ***/
-
-/*
- * team/russell/iax2-poke-fix notes ...
- *
- * scheduler callbacks that use peers
- *  - expire_registry (peer->expire)
- *  - iax2_poke_peer_s (peer->pokeexpire)
- *  - iax2_poke_noanswer (peer->pokeexpire)
- */
 
 #include "asterisk.h"
 
@@ -2740,8 +2731,10 @@
 		ast_copy_flags(peer, &globalflags, IAX_RTAUTOCLEAR|IAX_RTCACHEFRIENDS);
 		if (ast_test_flag(peer, IAX_RTAUTOCLEAR)) {
 			if (peer->expire > -1) {
-				if (!ast_sched_del(sched, peer->expire))
+				if (!ast_sched_del(sched, peer->expire)) {
+					peer->expire = -1;
 					peer_unref(peer);
+				}
 			}
 			peer->expire = iax2_sched_add(sched, (global_rtautoclear) * 1000, expire_registry, peer_ref(peer));
 			if (peer->expire == -1)
@@ -5860,8 +5853,10 @@
 					p->addr.sin_addr = in;
 					p->addr.sin_port = htons(atoi(c));
 					if (p->expire > -1) {
-						if (!ast_sched_del(sched, p->expire))
+						if (!ast_sched_del(sched, p->expire)) {
+							p->expire = -1;
 							peer_unref(p);
+						}
 					}
 					ast_device_state_changed("IAX2/%s", p->name); /* Activate notification */
 					p->expire = iax2_sched_add(sched, (p->expiry + 10) * 1000, expire_registry, peer_ref(p));
@@ -5956,8 +5951,10 @@
 	p->sockfd = fd;
 	/* Setup the expiry */
 	if (p->expire > -1) {
-		if (!ast_sched_del(sched, p->expire))
+		if (!ast_sched_del(sched, p->expire)) {
+			p->expire = -1;
 			peer_unref(p);
+		}
 	}
 	/* treat an unspecified refresh interval as the minimum */
 	if (!refresh)




More information about the asterisk-commits mailing list