aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
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) {