aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 18:51:52 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 18:51:52 +0000
commit722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch)
tree25683963c5e51bdedd6211cd0ea92a85639505c3 /funcs
parent815b5b09da5e555add7bba3d8fca588e7611248a (diff)
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent. (closes issue #16903) Reported by: Nick_Lewis Patches: pbx.c-specificity.patch uploaded by Nick Lewis (license 657) Tested by: Nick_Lewis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_aes.c6
-rw-r--r--funcs/func_channel.c9
-rw-r--r--funcs/func_odbc.c6
3 files changed, 17 insertions, 4 deletions
diff --git a/funcs/func_aes.c b/funcs/func_aes.c
index 21ee244ab..7cc8f4d57 100644
--- a/funcs/func_aes.c
+++ b/funcs/func_aes.c
@@ -163,4 +163,8 @@ static int load_module(void)
return res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "AES dialplan functions");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "AES dialplan functions",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_crypto",
+ );
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index 729bdf45b..69fb72fb3 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -88,6 +88,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<enum name="channeltype">
<para>R/O technology used for channel.</para>
</enum>
+ <enum name="checkhangup">
+ <para>R/O Whether the channel is hanging up (1/0)</para>
+ </enum>
<enum name="language">
<para>R/W language for sounds played.</para>
</enum>
@@ -298,7 +301,11 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
locked_copy_string(chan, buf, chan->tech->type, len);
else if (!strcasecmp(data, "accountcode"))
locked_copy_string(chan, buf, chan->accountcode, len);
- else if (!strcasecmp(data, "peeraccount"))
+ else if (!strcasecmp(data, "checkhangup")) {
+ ast_channel_lock(chan);
+ ast_copy_string(buf, ast_check_hangup(chan) ? "1" : "0", len);
+ ast_channel_unlock(chan);
+ } else if (!strcasecmp(data, "peeraccount"))
locked_copy_string(chan, buf, chan->peeraccount, len);
else if (!strcasecmp(data, "hangupsource"))
locked_copy_string(chan, buf, chan->hangupsource, len);
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index 55c06f4f6..7f2de02fc 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -502,8 +502,10 @@ static int acf_odbc_read(struct ast_channel *chan, const char *cmd, char *s, cha
if (stmt) {
break;
}
- ast_odbc_release_obj(obj);
- obj = NULL;
+ if (obj) {
+ ast_odbc_release_obj(obj);
+ obj = NULL;
+ }
}
if (!stmt) {