[asterisk-commits] branch oej/multiparking - r8280
/team/oej/multiparking/res/res_features.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Jan 19 12:28:40 MST 2006
Author: oej
Date: Thu Jan 19 13:28:38 2006
New Revision: 8280
URL: http://svn.digium.com/view/asterisk?rev=8280&view=rev
Log:
Making res_features aware of the channel setting. Any channel variables named
PARKINGLOT will override the channel setting.
Modified:
team/oej/multiparking/res/res_features.c
Modified: team/oej/multiparking/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/res/res_features.c?rev=8280&r1=8279&r2=8280&view=diff
==============================================================================
--- team/oej/multiparking/res/res_features.c (original)
+++ team/oej/multiparking/res/res_features.c Thu Jan 19 13:28:38 2006
@@ -309,6 +309,12 @@
if (!parkinglot)
parkinglot = default_parkinglot;
+
+ /* Check if the channel has a parking lot */
+ if (!ast_strlen_zero(chan->parkinglot))
+ parkinglotname = chan->parkinglot;
+
+ /* Channel variables override everything */
parkinglotname = pbx_builtin_getvar_helper(chan, "PARKINGLOT");
if (parkinglotname) {
if (option_debug)
@@ -1740,6 +1746,11 @@
struct ast_parkinglot *parkinglot = NULL;
LOCAL_USER_ADD(u);
+
+ /* Check if the channel has a parking lot */
+ if (!ast_strlen_zero(chan->parkinglot))
+ parkinglotname = chan->parkinglot;
+
parkinglotname = pbx_builtin_getvar_helper(chan, "PARKINGLOT");
if (parkinglotname) {
ast_log(LOG_DEBUG, "---------**--------- Found chanvar Parkinglot: %s\n", parkinglotname);
@@ -1782,6 +1793,10 @@
LOCAL_USER_ADD(u);
park = atoi((char *)data);
ast_mutex_lock(&parking_lock);
+
+ /* Check if the channel has a parking lot */
+ if (!ast_strlen_zero(chan->parkinglot))
+ parkinglotname = chan->parkinglot;
parkinglotname = pbx_builtin_getvar_helper(chan, "PARKINGLOT");
if (parkinglotname) {
ast_log(LOG_DEBUG, "---------**--------- Found chanvar Parkinglot: %s\n", parkinglotname);
More information about the asterisk-commits
mailing list