summaryrefslogtreecommitdiff
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2011-09-29 09:32:34 +0000
committerOlle Johansson <oej@edvina.net>2011-09-29 09:32:34 +0000
commitc04ab6b35c779ade99a36d64c0e3ff0528361b98 (patch)
tree2a5ce4edf7f87d146b5f4cb896c5155dfbdacfe1 /res/res_agi.c
parent50350a47ea1dcf5eaf3e2a60b490b1f2a6f692a5 (diff)
Just formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 87ae21a6d..d9c45e94d 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1935,22 +1935,26 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, const
long sample_offset = 0, max_length;
const char *edigits = "";
- if (argc < 4 || argc > 5)
+ if (argc < 4 || argc > 5) {
return RESULT_SHOWUSAGE;
+ }
- if (argv[3])
+ if (argv[3]) {
edigits = argv[3];
+ }
- if ((argc > 4) && (sscanf(argv[4], "%30ld", &sample_offset) != 1))
+ if ((argc > 4) && (sscanf(argv[4], "%30ld", &sample_offset) != 1)) {
return RESULT_SHOWUSAGE;
+ }
if (!(fs = ast_openstream(chan, argv[2], chan->language))) {
ast_agi_send(agi->fd, chan, "200 result=%d endpos=%ld\n", 0, sample_offset);
return RESULT_SUCCESS;
}
- if ((vfs = ast_openvstream(chan, argv[2], chan->language)))
+ if ((vfs = ast_openvstream(chan, argv[2], chan->language))) {
ast_debug(1, "Ooh, found a video stream, too\n");
+ }
ast_verb(3, "Playing '%s' (escape_digits=%s) (sample_offset %ld)\n", argv[2], edigits, sample_offset);
@@ -1958,11 +1962,13 @@ static int handle_streamfile(struct ast_channel *chan, AGI *agi, int argc, const
max_length = ast_tellstream(fs);
ast_seekstream(fs, sample_offset, SEEK_SET);
res = ast_applystream(chan, fs);
- if (vfs)
+ if (vfs) {
ast_applystream(chan, vfs);
+ }
ast_playstream(fs);
- if (vfs)
+ if (vfs) {
ast_playstream(vfs);
+ }
res = ast_waitstream_full(chan, argv[3], agi->audio, agi->ctrl);
/* this is to check for if ast_waitstream closed the stream, we probably are at