mod_callcenter: Add error response for queue load and queue reload (FS-2988)

This commit is contained in:
Marc Olivier Chouinard 2011-01-29 03:09:06 -05:00
parent be3483b924
commit 49a5effcdf
1 changed files with 6 additions and 3 deletions

View File

@ -2625,8 +2625,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
cc_queue_t *queue = NULL;
if ((queue = get_queue(queue_name))) {
queue_rwunlock(queue);
stream->write_function(stream, "%s", "+OK\n");
} else {
stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
}
stream->write_function(stream, "%s", "+OK\n");
}
} else if (action && !strcasecmp(action, "unload")) {
if (argc-initial_argc < 1) {
@ -2648,8 +2650,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
destroy_queue(queue_name, SWITCH_FALSE);
if ((queue = get_queue(queue_name))) {
queue_rwunlock(queue);
stream->write_function(stream, "%s", "+OK\n");
} else {
stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
}
stream->write_function(stream, "%s", "+OK\n");
}
} else if (action && !strcasecmp(action, "list")) {
if (argc-initial_argc < 1) {
@ -2671,7 +2675,6 @@ SWITCH_STANDARD_API(cc_config_api_function)
goto done;
} else {
const char *queue_name = argv[0 + initial_argc];
struct list_result cbt;
cbt.row_process = 0;
cbt.stream = stream;