[asterisk-commits] jpeeler: branch 1.6.1 r141042 - in /branches/1.6.1: ./ main/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 4 12:28:42 CDT 2008
Author: jpeeler
Date: Thu Sep 4 12:28:41 2008
New Revision: 141042
URL: http://svn.digium.com/view/asterisk?view=rev&rev=141042
Log:
Merged revisions 141039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r141039 | jpeeler | 2008-09-04 12:27:56 -0500 (Thu, 04 Sep 2008) | 15 lines
Merged revisions 141028 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r141028 | jpeeler | 2008-09-04 12:00:29 -0500 (Thu, 04 Sep 2008) | 7 lines
(closes issue #11979)
Fixes multiple parking problems:
Crash when executing a park on an extension dialed by AGI due to not returning the proper return code.
Crash when using a builtin feature that was a subset of a enabled dynamic feature.
Crash due to always hanging up the peer despite the fact that the peer was supposed to be parked.
........
................
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/main/features.c
branches/1.6.1/res/res_agi.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/main/features.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/main/features.c?view=diff&rev=141042&r1=141041&r2=141042
==============================================================================
--- branches/1.6.1/main/features.c (original)
+++ branches/1.6.1/main/features.c Thu Sep 4 12:28:41 2008
@@ -1697,8 +1697,13 @@
ast_autoservice_stop(idle);
- if (res == AST_PBX_KEEPALIVE)
- return AST_FEATURE_RETURN_PBX_KEEPALIVE;
+ if (res == AST_PBX_KEEPALIVE) {
+ /* do not hangup peer if feature is to be activated on it */
+ if ((ast_test_flag(feature, AST_FEATURE_FLAG_ONPEER) && sense == FEATURE_SENSE_CHAN) || (ast_test_flag(feature, AST_FEATURE_FLAG_ONSELF) && sense == FEATURE_SENSE_PEER))
+ return AST_FEATURE_RETURN_NO_HANGUP_PEER;
+ else
+ return AST_FEATURE_RETURN_PBX_KEEPALIVE;
+ }
else if (res == AST_PBX_NO_HANGUP_PEER)
return AST_FEATURE_RETURN_NO_HANGUP_PEER;
else if (res)
@@ -1747,12 +1752,13 @@
{
int x;
struct ast_flags features;
- int res = AST_FEATURE_RETURN_PASSDIGITS;
struct ast_call_feature *feature;
struct feature_group *fg = NULL;
struct feature_group_exten *fge;
const char *dynamic_features;
char *tmp, *tok;
+ int res = AST_FEATURE_RETURN_PASSDIGITS;
+ int feature_detected = 0;
if (sense == FEATURE_SENSE_CHAN) {
ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL);
@@ -1771,6 +1777,7 @@
/* Feature is up for consideration */
if (!strcmp(builtin_features[x].exten, code)) {
res = builtin_features[x].operation(chan, peer, config, code, sense, NULL);
+ feature_detected = 1;
break;
} else if (!strncmp(builtin_features[x].exten, code, strlen(code))) {
if (res == AST_FEATURE_RETURN_PASSDIGITS)
@@ -1780,7 +1787,7 @@
}
ast_rwlock_unlock(&features_lock);
- if (ast_strlen_zero(dynamic_features))
+ if (ast_strlen_zero(dynamic_features) || feature_detected)
return res;
tmp = ast_strdupa(dynamic_features);
Modified: branches/1.6.1/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/res/res_agi.c?view=diff&rev=141042&r1=141041&r2=141042
==============================================================================
--- branches/1.6.1/res/res_agi.c (original)
+++ branches/1.6.1/res/res_agi.c Thu Sep 4 12:28:41 2008
@@ -2948,7 +2948,7 @@
return -1;
}
- return 0;
+ return res;
}
static int agi_exec(struct ast_channel *chan, void *data)
More information about the asterisk-commits
mailing list