]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_conference: add conference list summary command (MODAPP-197)
authorMichael Jerris <mike@jerris.com>
Wed, 4 Feb 2009 23:16:32 +0000 (23:16 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 4 Feb 2009 23:16:32 +0000 (23:16 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11644 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 1db82060ec4ae934700e908a3e5232251ea5c9df..4705773443edf92afdaba6f82622b247ffe027c8 100644 (file)
@@ -3060,6 +3060,7 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
        void *val;
        char *d = ";";
        int pretty = 0;
+       int summary = 0;
        int argofs = (argc >= 2 && strcasecmp(argv[1], "list") == 0);   /* detect being called from chat vs. api */
 
        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) {
                        pretty = 1;
+               } else if (strcasecmp(argv[1 + argofs], "summary") == 0) {
+                       summary = 1;
                }
        }
 
@@ -3090,10 +3093,12 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
                                                                   conference->name,
                                                                   conference->count, conference->count == 1 ? "" : "s", switch_test_flag(conference, CFLAG_LOCKED) ? " locked" : "");
                        count++;
-                       if (pretty) {
-                               conference_list_pretty(conference, stream);
-                       } else {
-                               conference_list(conference, stream, d);
+                       if (!summary) {
+                               if (pretty) {
+                                       conference_list_pretty(conference, stream);
+                               } else {
+                                       conference_list(conference, stream, d);
+                               }
                        }
                }
        } else {