[asterisk-commits] wedhorn: branch wedhorn/skinny-session r391059 - /team/wedhorn/skinny-session...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jun 9 17:18:24 CDT 2013


Author: wedhorn
Date: Sun Jun  9 17:18:22 2013
New Revision: 391059

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391059
Log:
skinny: remove scheds in cleanup and destroy session after removing from list

Modified:
    team/wedhorn/skinny-session/channels/chan_skinny.c

Modified: team/wedhorn/skinny-session/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/wedhorn/skinny-session/channels/chan_skinny.c?view=diff&rev=391059&r1=391058&r2=391059
==============================================================================
--- team/wedhorn/skinny-session/channels/chan_skinny.c (original)
+++ team/wedhorn/skinny-session/channels/chan_skinny.c Sun Jun  9 17:18:22 2013
@@ -7389,6 +7389,13 @@
 		ast_mutex_unlock(&s->lock);
 	}
 
+	if (s->auth_timeout_sched && !ast_sched_del(sched, s->auth_timeout_sched)) {
+		s->auth_timeout_sched = 0;
+	}
+	if (s->keepalive_timeout_sched && !ast_sched_del(sched, s->keepalive_timeout_sched)) {
+		s->keepalive_timeout_sched = 0;
+	}
+
 	if (d) {
 		d->session = NULL;
 
@@ -7408,12 +7415,11 @@
 		}
 	}
 	
-	destroy_session(s);
-	
 	AST_LIST_LOCK(&sessions);
 	AST_LIST_REMOVE(&sessions, s, list);
 	AST_LIST_UNLOCK(&sessions);
-	
+
+	destroy_session(s);
 }
 
 static void *skinny_session(void *data)




More information about the asterisk-commits mailing list