aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_monitor.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-08 16:44:36 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-09-08 16:44:36 +0000
commitee8cba2208114438d40442616149adf12cc422c2 (patch)
treeb27b0710be1354a8026f5cc2c9ccf56b5bc4ccde /res/res_monitor.c
parent5facd91f37f0f8a283ced231f7a506868a0e1676 (diff)
First of Jayson's manager patches
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1485 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_monitor.c')
-rwxr-xr-xres/res_monitor.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c
index d7f73dd1f..618c18701 100755
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -282,7 +282,7 @@ static int start_monitor_action(struct mansession *s, struct message *m)
char *fname = astman_get_header(m, "File");
char *format = astman_get_header(m, "Format");
if((!name)||(!strlen(name))) {
- astman_send_error(s, "No channel specified");
+ astman_send_error(s, m, "No channel specified");
return 0;
}
c = ast_channel_walk(NULL);
@@ -293,16 +293,16 @@ static int start_monitor_action(struct mansession *s, struct message *m)
c = ast_channel_walk(c);
}
if (!c) {
- astman_send_error(s, "No such channel");
+ astman_send_error(s, m, "No such channel");
return 0;
}
if( ast_monitor_start( c, format, fname, 1 ) ) {
if( ast_monitor_change_fname( c, fname, 1 ) ) {
- astman_send_error(s, "Could not start monitoring channel");
+ astman_send_error(s, m, "Could not start monitoring channel");
return 0;
}
}
- astman_send_ack(s, "Started monitoring channel");
+ astman_send_ack(s, m, "Started monitoring channel");
return 0;
}
@@ -311,7 +311,7 @@ static int stop_monitor_action(struct mansession *s, struct message *m)
struct ast_channel *c = NULL;
char *name = astman_get_header(m, "Channel");
if((!name)||(!strlen(name))) {
- astman_send_error(s, "No channel specified");
+ astman_send_error(s, m, "No channel specified");
return 0;
}
c = ast_channel_walk(NULL);
@@ -322,14 +322,14 @@ static int stop_monitor_action(struct mansession *s, struct message *m)
c = ast_channel_walk(c);
}
if (!c) {
- astman_send_error(s, "No such channel");
+ astman_send_error(s, m, "No such channel");
return 0;
}
if( ast_monitor_stop( c, 1 ) ) {
- astman_send_error(s, "Could not stop monitoring channel");
+ astman_send_error(s, m, "Could not stop monitoring channel");
return 0;
}
- astman_send_ack(s, "Stopped monitoring channel");
+ astman_send_ack(s, m, "Stopped monitoring channel");
return 0;
}
@@ -339,11 +339,11 @@ static int change_monitor_action(struct mansession *s, struct message *m)
char *name = astman_get_header(m, "Channel");
char *fname = astman_get_header(m, "File");
if((!name) || (!strlen(name))) {
- astman_send_error(s, "No channel specified");
+ astman_send_error(s, m, "No channel specified");
return 0;
}
if ((!fname)||(!strlen(fname))) {
- astman_send_error(s, "No filename specified");
+ astman_send_error(s, m, "No filename specified");
return 0;
}
c = ast_channel_walk(NULL);
@@ -354,14 +354,14 @@ static int change_monitor_action(struct mansession *s, struct message *m)
c = ast_channel_walk(c);
}
if (!c) {
- astman_send_error(s, "No such channel");
+ astman_send_error(s, m, "No such channel");
return 0;
}
if( ast_monitor_change_fname( c, fname, 1 ) ) {
- astman_send_error(s, "Could not change monitored filename of channel");
+ astman_send_error(s, m, "Could not change monitored filename of channel");
return 0;
}
- astman_send_ack(s, "Stopped monitoring channel");
+ astman_send_ack(s, m, "Stopped monitoring channel");
return 0;
}