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"
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;
}
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);
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 {
if (info) {
char *tmp = strsep(&info, "|");
strncpy(confno, tmp, sizeof(confno));
- if (strlen(confno) == 0) {
+ if (ast_strlen_zero(confno)) {
allowretry = 1;
}
}
}
/* Not found? */
- if (!strlen(confno)) {
+ if (ast_strlen_zero(confno)) {
res = ast_streamfile(chan, "conf-noempty", chan->language);
if (!res)
ast_waitstream(chan, "");
}
}
}
- 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) {
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) {
if (allowretry)
strcpy(confno, "");
} else {
- if (strlen(cnf->pin)) {
+ if (!ast_strlen_zero(cnf->pin)) {
char pin[AST_MAX_EXTENSION];
if (*the_pin) {
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(¶ms, "|");
command = strsep(¶ms, "|");