mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +00:00
Merge "Message.c: Clear message channel frames on cleanup" into 13
This commit is contained in:
@@ -743,6 +743,7 @@ static void chan_cleanup(struct ast_channel *chan)
|
|||||||
struct ast_datastore *msg_ds, *ds;
|
struct ast_datastore *msg_ds, *ds;
|
||||||
struct varshead *headp;
|
struct varshead *headp;
|
||||||
struct ast_var_t *vardata;
|
struct ast_var_t *vardata;
|
||||||
|
struct ast_frame *cur;
|
||||||
|
|
||||||
ast_channel_lock(chan);
|
ast_channel_lock(chan);
|
||||||
|
|
||||||
@@ -771,6 +772,13 @@ static void chan_cleanup(struct ast_channel *chan)
|
|||||||
ast_var_delete(vardata);
|
ast_var_delete(vardata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Remove frames from read queue
|
||||||
|
*/
|
||||||
|
while ((cur = AST_LIST_REMOVE_HEAD(ast_channel_readq(chan), frame_list))) {
|
||||||
|
ast_frfree(cur);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Restore msg datastore.
|
* Restore msg datastore.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user