From 5b88b947f393b0ebb8e937d805794cb40298c2b9 Mon Sep 17 00:00:00 2001 From: oelewapperke Date: Thu, 13 Jan 2011 12:30:29 +0100 Subject: [PATCH] Erase the already dialed interface channel datastore upon starting the Dial application --- apps/app_dial.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/apps/app_dial.c b/apps/app_dial.c index b44e0c1..624a611 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1570,6 +1570,17 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", ""); pbx_builtin_setvar_helper(chan, "DIALEDTIME", ""); + /* Erase the datastore containing the list of already dialed interfaces */ + ast_channel_lock(chan); + datastore = ast_channel_datastore_find(chan, &dialed_interface_info, NULL); + + if (datastore) { + ast_channel_datastore_remove(chan, datastore); + ast_datastore_free(datastore); + datastore = NULL; + } + ast_channel_unlock(chan); + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Dial requires an argument (technology/number)\n"); pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status); -- 1.7.0.4