mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
CHANNEL() function sometime mix parameter and value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@44809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -112,13 +112,13 @@ static int func_channel_write(struct ast_channel *chan, char *function,
|
|||||||
locked_string_field_set(chan, musicclass, value);
|
locked_string_field_set(chan, musicclass, value);
|
||||||
else if (!strcasecmp(data, "tonezone")) {
|
else if (!strcasecmp(data, "tonezone")) {
|
||||||
struct tone_zone *new_zone;
|
struct tone_zone *new_zone;
|
||||||
if (!(new_zone = ast_get_indication_zone(data))) {
|
if (!(new_zone = ast_get_indication_zone(value))) {
|
||||||
ast_log(LOG_ERROR, "Unknown country code for tonezone. Check indications.conf for available country codes.\n");
|
ast_log(LOG_ERROR, "Unknown country code '%s' for tonezone. Check indications.conf for available country codes.\n", value);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else
|
} else
|
||||||
chan->zone = new_zone;
|
chan->zone = new_zone;
|
||||||
} else if (!strcasecmp(data, "callgroup"))
|
} else if (!strcasecmp(data, "callgroup"))
|
||||||
chan->callgroup = ast_get_group(data);
|
chan->callgroup = ast_get_group(value);
|
||||||
else if (!strcasecmp(data, "txgain")) {
|
else if (!strcasecmp(data, "txgain")) {
|
||||||
sscanf(value, "%hhd", &gainset);
|
sscanf(value, "%hhd", &gainset);
|
||||||
ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0);
|
ast_channel_setoption(chan, AST_OPTION_TXGAIN, &gainset, sizeof(gainset), 0);
|
||||||
|
@@ -1303,7 +1303,7 @@ static inline int ast_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds,
|
|||||||
ast_set_flag(c, AST_FLAG_BLOCKING); \
|
ast_set_flag(c, AST_FLAG_BLOCKING); \
|
||||||
} }
|
} }
|
||||||
|
|
||||||
ast_group_t ast_get_group(char *s);
|
ast_group_t ast_get_group(const char *s);
|
||||||
|
|
||||||
/*! \brief print call- and pickup groups into buffer */
|
/*! \brief print call- and pickup groups into buffer */
|
||||||
char *ast_print_group(char *buf, int buflen, ast_group_t group);
|
char *ast_print_group(char *buf, int buflen, ast_group_t group);
|
||||||
|
@@ -4115,7 +4115,7 @@ int ast_tonepair(struct ast_channel *chan, int freq1, int freq2, int duration, i
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_group_t ast_get_group(char *s)
|
ast_group_t ast_get_group(const char *s)
|
||||||
{
|
{
|
||||||
char *piece;
|
char *piece;
|
||||||
char *c;
|
char *c;
|
||||||
|
Reference in New Issue
Block a user