summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c4
-rw-r--r--res/res_sdp_translator_pjmedia.c4
-rw-r--r--res/res_stasis_device_state.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index e8497f7ca..466063557 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2393,7 +2393,7 @@ static int handle_waitfordigit(struct ast_channel *chan, AGI *agi, int argc, con
return RESULT_SHOWUSAGE;
if (sscanf(argv[3], "%30d", &to) != 1)
return RESULT_SHOWUSAGE;
- res = ast_waitfordigit_full(chan, to, agi->audio, agi->ctrl);
+ res = ast_waitfordigit_full(chan, to, NULL, agi->audio, agi->ctrl);
ast_agi_send(agi->fd, chan, "200 result=%d\n", res);
return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE;
}
@@ -2673,7 +2673,7 @@ static int handle_getoption(struct ast_channel *chan, AGI *agi, int argc, const
/* If the user didnt press a key, wait for digitTimeout*/
if (res == 0 ) {
- res = ast_waitfordigit_full(chan, timeout, agi->audio, agi->ctrl);
+ res = ast_waitfordigit_full(chan, timeout, NULL, agi->audio, agi->ctrl);
/* Make sure the new result is in the escape digits of the GET OPTION */
if ( !strchr(edigits,res) )
res=0;
diff --git a/res/res_sdp_translator_pjmedia.c b/res/res_sdp_translator_pjmedia.c
index 85f246e83..d80f3d554 100644
--- a/res/res_sdp_translator_pjmedia.c
+++ b/res/res_sdp_translator_pjmedia.c
@@ -484,7 +484,7 @@ AST_TEST_DEFINE(pjmedia_to_sdp_test)
}
cleanup:
- ast_sdp_free(sdp);
+ ao2_cleanup(sdp);
ast_sdp_translator_free(translator);
pj_pool_release(pool);
return res;
@@ -560,7 +560,7 @@ AST_TEST_DEFINE(sdp_to_pjmedia_test)
}
cleanup:
- ast_sdp_free(sdp);
+ ao2_cleanup(sdp);
ast_sdp_translator_free(translator);
pj_pool_release(pool);
return res;
diff --git a/res/res_stasis_device_state.c b/res/res_stasis_device_state.c
index 344cb40c9..276a98b93 100644
--- a/res/res_stasis_device_state.c
+++ b/res/res_stasis_device_state.c
@@ -106,7 +106,6 @@ static int device_state_subscriptions_cmp(void *obj, void *arg, int flags)
static void device_state_subscription_destroy(void *obj)
{
struct device_state_subscription *sub = obj;
- sub->sub = stasis_unsubscribe_and_join(sub->sub);
ast_string_field_free_memory(sub);
}
@@ -152,6 +151,9 @@ static struct device_state_subscription *find_device_state_subscription(
static void remove_device_state_subscription(
struct device_state_subscription *sub)
{
+ if (sub->sub) {
+ sub->sub = stasis_unsubscribe_and_join(sub->sub);
+ }
ao2_unlink_flags(device_state_subscriptions, sub, OBJ_NOLOCK);
}