Merged revisions 219519 via svnmerge from
[asterisk/asterisk.git] / channels / chan_iax2.c
index e88779b..700e9b5 100644 (file)
@@ -1685,6 +1685,7 @@ static void iax2_destroy_helper(struct chan_iax2_pvt *pvt)
 static void iax2_frame_free(struct iax_frame *fr)
 {
        ast_sched_thread_del(sched, fr->retrans);
+       fr->retrans = -1;
        iax_frame_free(fr);
 }
 
@@ -3352,7 +3353,6 @@ static void __attempt_transmit(const void *data)
                /* Don't attempt delivery, just remove it from the queue */
                AST_LIST_REMOVE(&frame_queue[callno], f, list);
                ast_mutex_unlock(&iaxsl[callno]);
-               f->retrans = -1;
                /* Free the IAX frame */
                iax2_frame_free(f);
        } else if (callno) {