mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 08:49:01 +00:00
mod_conference: add conference list summary command (MODAPP-197)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11644 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ae220d3341
commit
40b19bf28b
@ -3060,6 +3060,7 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
|||||||
void *val;
|
void *val;
|
||||||
char *d = ";";
|
char *d = ";";
|
||||||
int pretty = 0;
|
int pretty = 0;
|
||||||
|
int summary = 0;
|
||||||
int argofs = (argc >= 2 && strcasecmp(argv[1], "list") == 0); /* detect being called from chat vs. api */
|
int argofs = (argc >= 2 && strcasecmp(argv[1], "list") == 0); /* detect being called from chat vs. api */
|
||||||
|
|
||||||
if (argv[1 + argofs]) {
|
if (argv[1 + argofs]) {
|
||||||
@ -3078,6 +3079,8 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
|||||||
}
|
}
|
||||||
} else if (strcasecmp(argv[1 + argofs], "pretty") == 0) {
|
} else if (strcasecmp(argv[1 + argofs], "pretty") == 0) {
|
||||||
pretty = 1;
|
pretty = 1;
|
||||||
|
} else if (strcasecmp(argv[1 + argofs], "summary") == 0) {
|
||||||
|
summary = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3090,12 +3093,14 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
|
|||||||
conference->name,
|
conference->name,
|
||||||
conference->count, conference->count == 1 ? "" : "s", switch_test_flag(conference, CFLAG_LOCKED) ? " locked" : "");
|
conference->count, conference->count == 1 ? "" : "s", switch_test_flag(conference, CFLAG_LOCKED) ? " locked" : "");
|
||||||
count++;
|
count++;
|
||||||
|
if (!summary) {
|
||||||
if (pretty) {
|
if (pretty) {
|
||||||
conference_list_pretty(conference, stream);
|
conference_list_pretty(conference, stream);
|
||||||
} else {
|
} else {
|
||||||
conference_list(conference, stream, d);
|
conference_list(conference, stream, d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
count++;
|
count++;
|
||||||
if (pretty) {
|
if (pretty) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user