Fix some tests that didn't get opaquification changes

Review: https://reviewboard.asterisk.org/r/1766/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2012-02-23 01:53:17 +00:00
parent 5b0f29d710
commit 6dcfd18308
2 changed files with 34 additions and 4 deletions

View File

@@ -341,7 +341,8 @@ AST_TEST_DEFINE(crypto_loaded_test)
AST_TEST_DEFINE(adsi_loaded_test)
{
struct ast_channel c = { .adsicpe = AST_ADSI_AVAILABLE, };
struct ast_channel *c;
int res;
switch (cmd) {
case TEST_INIT:
info->name = "adsi_loaded_test";
@@ -353,7 +354,13 @@ AST_TEST_DEFINE(adsi_loaded_test)
break;
}
return ast_adsi_available(&c) ? AST_TEST_PASS : AST_TEST_FAIL;
if (!(c = ast_dummy_channel_alloc())) {
return AST_TEST_FAIL;
}
ast_channel_adsicpe_set(c, AST_ADSI_AVAILABLE);
res = ast_adsi_available(c) ? AST_TEST_PASS : AST_TEST_FAIL;
c = ast_channel_unref(c);
return res;
}
static int handle_noop(struct ast_channel *chan, AGI *agi, int arg, const char * const argv[])