[Asterisk-cvs] asterisk/apps app_meetme.c,1.29,1.30

markster at lists.digium.com markster at lists.digium.com
Thu May 27 10:20:45 CDT 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv2189/apps

Modified Files:
	app_meetme.c 
Log Message:
Meetme fixes (bug #1729)


Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- app_meetme.c	23 May 2004 23:46:43 -0000	1.29
+++ app_meetme.c	27 May 2004 14:35:26 -0000	1.30
@@ -47,8 +47,9 @@
 static char *descrip =
 "  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe conference.\n"
 "If the conference number is omitted, the user will be prompted to enter\n"
-"one.  This application always returns -1.  A ZAPTEL INTERFACE MUST BE\n"
-"INSTALLED FOR CONFERENCING TO WORK!\n\n"
+"one. \n"
+"MeetMe returns 0 if user pressed # to exit (see option 'p'), otherwise -1.\n"
+"Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK!\n\n"
 
 "The option string may contain zero or more of the following characters:\n"
 "      'm' -- set monitor only mode (Listen only, no talking)\n"
@@ -1021,7 +1022,7 @@
 	char *confnum, *localdata;
 	char val[80] = "0"; 
 
-	if (!data || !strlen(data)) {
+	if (!data || ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "MeetMeCount requires an argument (conference number)\n");
 		return -1;
 	}
@@ -1034,7 +1035,7 @@
 	else
 		count = 0;
 
-	if (localdata && strlen(localdata)){
+	if (localdata && !ast_strlen_zero(localdata)){
 		/* have var so load it and exit */
 		snprintf(val,sizeof(val), "%i",count);
 		pbx_builtin_setvar_helper(chan, localdata,val);
@@ -1061,7 +1062,7 @@
 	int empty = 0, empty_no_pin = 0;
 	char *notdata, *info, *inflags = NULL, *inpin = NULL, the_pin[AST_MAX_EXTENSION] = "";
 
-	if (!data || !strlen(data)) {
+	if (!data || ast_strlen_zero(data)) {
 		allowretry = 1;
 		notdata = "";
 	} else {
@@ -1076,7 +1077,7 @@
 	if (info) {
 		char *tmp = strsep(&info, "|");
 		strncpy(confno, tmp, sizeof(confno));
-		if (strlen(confno) == 0) {
+		if (ast_strlen_zero(confno)) {
 			allowretry = 1;
 		}
 	}
@@ -1198,7 +1199,7 @@
 			}
 
 			/* Not found? */
-			if (!strlen(confno)) {
+			if (ast_strlen_zero(confno)) {
 				res = ast_streamfile(chan, "conf-noempty", chan->language);
 				if (!res)
 					ast_waitstream(chan, "");
@@ -1212,7 +1213,7 @@
 				}
 			}
 		}
-		while (allowretry && (!strlen(confno)) && (++retrycnt < 4)) {
+		while (allowretry && (ast_strlen_zero(confno)) && (++retrycnt < 4)) {
 			/* Prompt user for conference number */
 			res = ast_app_getdata(chan, "conf-getconfno", confno, sizeof(confno) - 1, 0);
 			if (res < 0) {
@@ -1222,7 +1223,7 @@
 				break;
 			}
 		}
-		if (strlen(confno)) {
+		if (!ast_strlen_zero(confno)) {
 			/* Check the validity of the conference */
 			cnf = find_conf(chan, confno, 1, dynamic, the_pin);
 			if (!cnf) {
@@ -1233,7 +1234,7 @@
 				if (allowretry)
 					strcpy(confno, "");
 			} else {
-				if (strlen(cnf->pin)) {
+				if (!ast_strlen_zero(cnf->pin)) {
 					char pin[AST_MAX_EXTENSION];
 
 					if (*the_pin) {
@@ -1301,7 +1302,7 @@
 
 	ast_mutex_lock(&conflock);
 	/* The param has the conference number the user and the command to execute */
-	if (data && strlen(data)) {		
+	if (data && !ast_strlen_zero(data)) {		
 		params = ast_strdupa((char *) data);
 		conf = strsep(&params, "|");
 		command = strsep(&params, "|");




More information about the svn-commits mailing list