[asterisk-commits] branch oej/test-this-branch r17625 - in /team/oej/test-this-branch: ./ apps/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 5 09:06:09 MST 2006


Author: oej
Date: Wed Apr  5 11:06:06 2006
New Revision: 17625

URL: http://svn.digium.com/view/asterisk?rev=17625&view=rev
Log:
Issue #6212 - Meetme list concise CLI command

Modified:
    team/oej/test-this-branch/README.test-this-branch
    team/oej/test-this-branch/README.test-this-branch.html
    team/oej/test-this-branch/apps/app_meetme.c

Modified: team/oej/test-this-branch/README.test-this-branch
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/README.test-this-branch?rev=17625&r1=17624&r2=17625&view=diff
==============================================================================
--- team/oej/test-this-branch/README.test-this-branch (original)
+++ team/oej/test-this-branch/README.test-this-branch Wed Apr  5 11:06:06 2006
@@ -55,6 +55,7 @@
   (Note: I changed the name in this version...)
 - TOUPPER and TOLOWER ASCII functions (powerkill, #6668)
   (With some changes)
+- Meetme list concise cli command (moy, #6212)
 
 Things that has been commited to svn trunk:
 - Abandon Queue manager event (tim_ringenbach, #6459)

Modified: team/oej/test-this-branch/README.test-this-branch.html
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/README.test-this-branch.html?rev=17625&r1=17624&r2=17625&view=diff
==============================================================================
--- team/oej/test-this-branch/README.test-this-branch.html (original)
+++ team/oej/test-this-branch/README.test-this-branch.html Wed Apr  5 11:06:06 2006
@@ -58,8 +58,11 @@
 <li> Manager playDTMF command (squinky, <a href="http://bugs.digium.com/view.php?id=6682">#6682</a>)<br /> 
   (Note: I changed the name in this version...)<br />
 <li> Fix race condition in voicemail (corydon76, <a href="http://bugs.digium.com/view.php?id=6714">#6714</a>)<br />
-<li> TOUPPER and TOLOWER ASCII functions (powerkill, <a href="http://bugs.digium.com/view.php?id=6668">#6668</a>)
-  (With some changes)<br />
+<li> TOUPPER and TOLOWER ASCII functions (powerkill, 
+<a href="http://bugs.digium.com/view.php?id=6668">#6668</a>)
+  (With some changes)<br /></li>
+<li>Meetme list concise cli command (moy, 
+<a href="http://bugs.digium.com/view.php?id=6212">#6212</a>)</li>
 </ul>
 
 <h3>Things that has been commited to svn trunk:</h3>

Modified: team/oej/test-this-branch/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_meetme.c?rev=17625&r1=17624&r2=17625&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_meetme.c (original)
+++ team/oej/test-this-branch/apps/app_meetme.c Wed Apr  5 11:06:06 2006
@@ -641,10 +641,13 @@
 			strncat(cmdline, "|k|", sizeof(cmdline) - strlen(cmdline) - 1);
 			strncat(cmdline, argv[3], sizeof(cmdline) - strlen(cmdline) - 1);
 		}	
-	} else if(strcmp(argv[1], "list") == 0) {
+	} else if (strcmp(argv[1], "list") == 0) {
+		int concise = ( argc == 4 && ( !strcasecmp(argv[3], "concise") ) );
 		/* List all the users in a conference */
 		if (AST_LIST_EMPTY(&confs)) {
-			ast_cli(fd, "No active conferences.\n");
+			if ( !concise ) {
+				ast_cli(fd, "No active conferences.\n");
+			}	
 			return RESULT_SUCCESS;	
 		}
 		/* Find the right conference */
@@ -653,28 +656,43 @@
 				break;
 		}
 		if (!cnf) {
-			ast_cli(fd, "No such conference: %s.\n",argv[2]);
+			if ( !concise ) {
+				ast_cli(fd, "No such conference: %s.\n",argv[2]);
+			}	
 			return RESULT_SUCCESS;
 		}
 		/* Show all the users */
-		for (user = cnf->firstuser; user; user = user->nextuser){
+		for (user = cnf->firstuser; user; user = user->nextuser) {
 			now = time(NULL);
 			hr = (now - user->jointime) / 3600;
 			min = ((now - user->jointime) % 3600) / 60;
 			sec = (now - user->jointime) % 60;
-
-
-			ast_cli(fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %02d:%02d:%02d\n",
-				user->user_no,
-				user->chan->cid.cid_num ? user->chan->cid.cid_num : "<unknown>",
-				user->chan->cid.cid_name ? user->chan->cid.cid_name : "<no name>",
-				user->chan->name,
-				user->userflags & CONFFLAG_ADMIN ? "(Admin)" : "",
-				user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "",
-				user->adminflags & ADMINFLAG_MUTED ? "(Admn Muted)" : "",
-				istalking(user->talking), hr, min, sec);
-		}
-		ast_cli(fd,"%d users in that conference.\n",cnf->users);
+			if ( !concise ) {
+				ast_cli(fd, "User #: %-2.2d %12.12s %-20.20s Channel: %s %s %s %s %s %02d:%02d:%02d\n",
+					user->user_no,
+					user->chan->cid.cid_num ? user->chan->cid.cid_num : "<unknown>",
+					user->chan->cid.cid_name ? user->chan->cid.cid_name : "<no name>",
+					user->chan->name,
+					user->userflags & CONFFLAG_ADMIN ? "(Admin)" : "",
+					user->userflags & CONFFLAG_MONITOR ? "(Listen only)" : "",
+					user->adminflags & ADMINFLAG_MUTED ? "(Admn Muted)" : "",
+					istalking(user->talking), hr, min, sec);
+			} else {
+				ast_cli(fd, "%d!%s!%s!%s!%s!%s!%s!%d!%02d:%02d:%02d\n",
+					user->user_no,
+					user->chan->cid.cid_num  ? user->chan->cid.cid_num   : "",
+					user->chan->cid.cid_name ? user->chan->cid.cid_name  : "",
+					user->chan->name,
+					user->userflags  & CONFFLAG_ADMIN   ? "1"            : "0",
+					user->userflags  & CONFFLAG_MONITOR ? "1"            : "0",
+					user->adminflags & ADMINFLAG_MUTED  ? "1"            : "0",
+					user->talking, hr, min, sec);
+
+			}	
+		}
+		if ( !concise ) {
+			ast_cli(fd,"%d users in that conference.\n",cnf->users);
+		}	
 
 		return RESULT_SUCCESS;
 	} else 
@@ -740,6 +758,8 @@
 			}
 			AST_LIST_UNLOCK(&confs);
 			return usr ? strdup(usrno) : NULL;
+		} else if ( strstr(line, "list") && ( state == 0 ) )  {
+			return strdup("concise");
 		}
 	}
 
@@ -747,7 +767,7 @@
 }
 	
 static char conf_usage[] =
-"Usage: meetme  (un)lock|(un)mute|kick|list <confno> <usernumber>\n"
+"Usage: meetme  (un)lock|(un)mute|kick|list [concise] <confno> <usernumber>\n"
 "       Executes a command for the conference or on a conferee\n";
 
 static struct ast_cli_entry cli_conf = {



More information about the asterisk-commits mailing list