summaryrefslogtreecommitdiff
path: root/res/res_monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_monitor.c')
-rw-r--r--res/res_monitor.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 3ac6e455f..9dcbdbe62 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -27,7 +27,7 @@
<use type="module">func_periodic_hook</use>
<support_level>core</support_level>
***/
-
+
#include "asterisk.h"
#include <sys/stat.h>
@@ -271,9 +271,9 @@ AST_MUTEX_DEFINE_STATIC(monitorlock);
static unsigned long seq = 0;
-/*!
- * \brief Change state of monitored channel
- * \param chan
+/*!
+ * \brief Change state of monitored channel
+ * \param chan
* \param state monitor state
* \retval 0 on success.
* \retval -1 on failure.
@@ -372,7 +372,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_start)(struct ast_channel *chan, const cha
} else {
monitor->format = ast_strdup("wav");
}
-
+
/* open files */
if (stream_action & X_REC_IN) {
if (ast_fileexists(monitor->read_filename, NULL, NULL) > 0)
@@ -446,13 +446,13 @@ static const char *get_soxmix_format(const char *format)
res = "ul";
if (!strcasecmp(format,"alaw"))
res = "al";
-
+
return res;
}
-/*!
- * \brief Stop monitoring channel
- * \param chan
+/*!
+ * \brief Stop monitoring channel
+ * \param chan
* \param need_lock
* Stop the recording, close any open streams, mix in/out channels if required
* \return Always 0
@@ -512,7 +512,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_stop)(struct ast_channel *chan, int need_l
#endif
format = get_soxmix_format(format);
delfiles = 1;
- }
+ }
execute_args = pbx_builtin_getvar_helper(chan, "MONITOR_EXEC_ARGS");
if (ast_strlen_zero(execute_args)) {
execute_args = "";
@@ -578,8 +578,8 @@ static int unpause_monitor_exec(struct ast_channel *chan, const char *data)
return ast_monitor_unpause(chan);
}
-/*!
- * \brief Change monitored filename of channel
+/*!
+ * \brief Change monitored filename of channel
* \param chan
* \param fname_base new filename
* \param need_lock
@@ -624,7 +624,7 @@ int AST_OPTIONAL_API_NAME(ast_monitor_change_fname)(struct ast_channel *chan, co
* and we aren't interfering with the recording itself.
*/
ast_debug(2, "comparing tmpstring %s to filename_base %s\n", tmpstring, ast_channel_monitor(chan)->filename_base);
-
+
if ((fd[0] = open(tmpstring, O_CREAT | O_WRONLY, 0644)) < 0 ||
(fd[1] = open(ast_channel_monitor(chan)->filename_base, O_CREAT | O_EXCL | O_WRONLY, 0644)) < 0) {
if (fd[0] < 0) {
@@ -708,7 +708,7 @@ static int start_monitor_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG(fname_base);
AST_APP_ARG(options);
);
-
+
/* Parse arguments. */
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR, "Monitor requires an argument\n");