summaryrefslogtreecommitdiff
path: root/apps/app_externalivr.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2008-02-14 10:19:09 +0000
committerOlle Johansson <oej@edvina.net>2008-02-14 10:19:09 +0000
commit9cf6138725bfad79d0aa95ff8cf16e8763dbc0a1 (patch)
treeab8a5968b2869e2b4b8713d436e0b3a9e1ad8061 /apps/app_externalivr.c
parent8e4c97bf0a6c8796c75fe73038b02686d5fe951e (diff)
Formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103668 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_externalivr.c')
-rw-r--r--apps/app_externalivr.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index dadb82e68..a3d95aa40 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -228,8 +228,8 @@ static struct ast_generator gen =
static void ast_eivr_getvariable(struct ast_channel *chan, char *data, char *outbuf, int outbuflen)
{
- // original input data: "G,var1,var2,"
- // data passed as "data": "var1,var2"
+ /* original input data: "G,var1,var2," */
+ /* data passed as "data": "var1,var2" */
char *inbuf, *variable;
const char *value;
@@ -272,7 +272,7 @@ static void ast_eivr_setvariable(struct ast_channel *chan, char *data)
variable = strtok_r(inbuf, ",", &saveptr);
ast_chan_log(LOG_DEBUG, chan, "Setting up a variable: %s\n", variable);
if(variable) {
- //variable contains "varname=value"
+ /* variable contains "varname=value" */
strncpy(buf, variable, sizeof(buf));
value = strchr(buf, '=');
if(!value)
@@ -335,7 +335,7 @@ static int app_exec(struct ast_channel *chan, void *data)
buf = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, buf);
- //copy args and replace commas with pipes
+ /* copy args and replace commas with pipes */
pipe_delim_argbuf = ast_strdupa(data);
while((pdargbuf_ptr = strchr(pipe_delim_argbuf, ',')) != NULL)
pdargbuf_ptr[0] = '|';
@@ -580,20 +580,21 @@ static int eivr_comm(struct ast_channel *chan, struct ivr_localuser *u,
AST_LIST_UNLOCK(&u->playlist);
}
} else if (input[0] == 'G') {
- // A get variable message: "G,variable1,variable2,..."
+ /* A get variable message: "G,variable1,variable2,..." */
char response[2048];
+
ast_chan_log(LOG_NOTICE, chan, "Getting a Variable out of the channel: %s\n", &input[2]);
ast_eivr_getvariable(chan, &input[2], response, sizeof(response));
send_eivr_event(eivr_events, 'G', response, chan);
} else if (input[0] == 'V') {
- // A set variable message: "V,variablename=foo"
+ /* A set variable message: "V,variablename=foo" */
ast_chan_log(LOG_NOTICE, chan, "Setting a Variable up: %s\n", &input[2]);
ast_eivr_setvariable(chan, &input[2]);
} else if (input[0] == 'L') {
ast_chan_log(LOG_NOTICE, chan, "Log message from EIVR: %s\n", &input[2]);
} else if (input[0] == 'X') {
ast_chan_log(LOG_NOTICE, chan, "Exiting ExternalIVR: %s\n", &input[2]);
- //TODO: add deprecation debug message for X command here
+ /*! \todo add deprecation debug message for X command here */
res = 0;
break;
} else if (input[0] == 'E') {