diff options
author | Richard Mudgett <rmudgett@digium.com> | 2011-08-10 18:27:16 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2011-08-10 18:27:16 +0000 |
commit | 02ecb12f64043fc73e05b71c4218c12fa8311e3e (patch) | |
tree | 1f0f938ec86fc8f8331335d5f3616e5acc7b4571 /main/features.c | |
parent | dc9513a69d8d8d12e80a287d8f99c7d3de5d249a (diff) |
Merged revisions 331418 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
........
r331418 | rmudgett | 2011-08-10 13:25:08 -0500 (Wed, 10 Aug 2011) | 6 lines
Revert -r318141. It was a band-aid that only partially fixed parking.
A better fix is on reviewboard review 1358.
(issue ASTERISK-17374)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/main/features.c b/main/features.c index 29ba5643d..d7463ebc4 100644 --- a/main/features.c +++ b/main/features.c @@ -213,22 +213,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") Answer a parked call. </synopsis> <syntax> - <parameter name="exten" required="true" argsep="@"> - <argument name="exten" required="true"> - <para>Specify extension.</para> - </argument> - <argument name="parkinglot"> - <para>Optionally specify a parkinglot.<literal>exten</literal>.</para> - </argument> - </parameter> + <parameter name="exten" required="true" /> </syntax> <description> <para>Used to connect to a parked call. This application is always registered internally and does not need to be explicitly added into the dialplan, although you should include the <literal>parkedcalls</literal> context. If no extension is provided, then the first available - parked call will be acquired. If <literal>parkinglot</literal> is included,the - parkinglot with that name will be used to seek the extension.</para> + parked call will be acquired.</para> </description> <see-also> <ref type="application">Park</ref> @@ -616,18 +608,6 @@ static int find_parkinglot_by_exten_cb(void *obj, void *args, int flags) return 0; } -static int find_parkinglot_by_name_cb(void *obj, void *args, int flags) -{ - struct ast_parkinglot *parkinglot = obj; - const char *parkname = args; - - if (!strcmp(parkinglot->name, parkname)) { - return CMP_MATCH | CMP_STOP; - } - - return 0; -} - int ast_parking_ext_valid(const char *exten_str, struct ast_channel *chan, const char *context) { struct ast_exten *exten; @@ -4530,29 +4510,12 @@ static int park_exec_full(struct ast_channel *chan, const char *data) int park = 0; struct ast_bridge_config config; struct ast_parkinglot *parkinglot; - const char *lotname_split = NULL; /* name of the parking lot if an '@' symbol is included in data */ if (data) { - if (sscanf(data, "%u", &park) != 1) { - /* Something went wrong when parsing the extension */ - ast_log(LOG_WARNING, "Could not parse extension from '%s'\n", data); - return -1; - } - if ((lotname_split = strchr(data, (int)'@'))) { - lotname_split++; - } - } - - /* - * If we found an '@' in data, we want to specify the parkinglot used by its name. - * otherwise we just search by position. - */ - if (lotname_split) { - parkinglot = ao2_callback(parkinglots, 0, find_parkinglot_by_name_cb, (void *) (lotname_split)); - } else { - parkinglot = ao2_callback(parkinglots, 0, find_parkinglot_by_position_cb, (void *) &park); + park = atoi((char *) data); } + parkinglot = ao2_callback(parkinglots, 0, find_parkinglot_by_position_cb, (void *) &park); if (!parkinglot) parkinglot = default_parkinglot; |