Opaquify channel stringfields

Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2012-01-24 20:12:09 +00:00
parent 2144ba5df2
commit 99cae5b750
74 changed files with 858 additions and 801 deletions

View File

@@ -918,20 +918,20 @@ static char *handle_chanlist(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
c->appl ? c->appl : "(None)",
S_OR(c->data, ""), /* XXX different from verbose ? */
S_COR(c->caller.id.number.valid, c->caller.id.number.str, ""),
S_OR(c->accountcode, ""),
S_OR(c->peeraccount, ""),
S_OR(ast_channel_accountcode(c), ""),
S_OR(ast_channel_peeraccount(c), ""),
c->amaflags,
durbuf,
bc ? ast_channel_name(bc) : "(None)",
c->uniqueid);
ast_channel_uniqueid(c));
} else if (verbose) {
ast_cli(a->fd, VERBOSE_FORMAT_STRING, ast_channel_name(c), c->context, c->exten, c->priority, ast_state2str(c->_state),
c->appl ? c->appl : "(None)",
c->data ? S_OR(c->data, "(Empty)" ): "(None)",
S_COR(c->caller.id.number.valid, c->caller.id.number.str, ""),
durbuf,
S_OR(c->accountcode, ""),
S_OR(c->peeraccount, ""),
S_OR(ast_channel_accountcode(c), ""),
S_OR(ast_channel_peeraccount(c), ""),
bc ? ast_channel_name(bc) : "(None)");
} else {
char locbuf[40] = "(None)";
@@ -1475,13 +1475,13 @@ static char *handle_showchan(struct ast_cli_entry *e, int cmd, struct ast_cli_ar
" Application: %s\n"
" Data: %s\n"
" Blocking in: %s\n",
ast_channel_name(c), c->tech->type, c->uniqueid, c->linkedid,
ast_channel_name(c), c->tech->type, ast_channel_uniqueid(c), ast_channel_linkedid(c),
S_COR(c->caller.id.number.valid, c->caller.id.number.str, "(N/A)"),
S_COR(c->caller.id.name.valid, c->caller.id.name.str, "(N/A)"),
S_COR(c->connected.id.number.valid, c->connected.id.number.str, "(N/A)"),
S_COR(c->connected.id.name.valid, c->connected.id.name.str, "(N/A)"),
S_OR(c->dialed.number.str, "(N/A)"),
c->language,
ast_channel_language(c),
ast_state2str(c->_state), c->_state, c->rings,
ast_getformatname_multiple(nf, sizeof(nf), c->nativeformats),
ast_getformatname(&c->writeformat),