diff options
author | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:23:22 -0500 |
---|---|---|
committer | Sean Bright <sean.bright@gmail.com> | 2017-12-22 09:23:22 -0500 |
commit | fd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch) | |
tree | 42d2a87726d196f4db1c68489007520a4c597062 /apps/app_mp3.c | |
parent | 9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff) |
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'apps/app_mp3.c')
-rw-r--r-- | apps/app_mp3.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/app_mp3.c b/apps/app_mp3.c index 678f76d72..e48cf09a0 100644 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -24,14 +24,14 @@ * * \note Add feature to play local M3U playlist file * Vincent Li <mchun.li@gmail.com> - * + * * \ingroup applications */ /*** MODULEINFO <support_level>extended</support_level> ***/ - + #include "asterisk.h" #include <sys/time.h> @@ -81,7 +81,7 @@ static int mp3play(const char *filename, unsigned int sampling_rate, int fd) char sampling_rate_str[8]; res = ast_safe_fork(0); - if (res < 0) + if (res < 0) ast_log(LOG_WARNING, "Fork failed\n"); if (res) { return res; @@ -148,7 +148,7 @@ static int timed_read(int fd, void *data, int datalen, int timeout) return -1; } return read(fd, data, datalen); - + } static int mp3_exec(struct ast_channel *chan, const char *data) @@ -181,7 +181,7 @@ static int mp3_exec(struct ast_channel *chan, const char *data) ast_log(LOG_WARNING, "Unable to create pipe\n"); return -1; } - + ast_stopstream(chan); native_format = ast_format_cap_get_format(ast_channel_nativeformats(chan), 0); @@ -203,7 +203,7 @@ static int mp3_exec(struct ast_channel *chan, const char *data) myf.f.delivery.tv_sec = 0; myf.f.delivery.tv_usec = 0; myf.f.data.ptr = myf.frdata; - + res = mp3play(data, sampling_rate, fds[1]); if (!strncasecmp(data, "http://", 7)) { timeout = 10000; @@ -253,20 +253,20 @@ static int mp3_exec(struct ast_channel *chan, const char *data) break; } ast_frfree(f); - } + } } } } close(fds[0]); close(fds[1]); - + if (pid > -1) kill(pid, SIGKILL); if (!res && owriteformat) ast_set_write_format(chan, owriteformat); ast_frfree(&myf.f); - + return res; } @@ -281,4 +281,3 @@ static int load_module(void) } AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Silly MP3 Application"); - |