Index: apps/app_meetme.c =================================================================== --- apps/app_meetme.c (revision 13620) +++ apps/app_meetme.c (working copy) @@ -477,8 +477,8 @@ ast_mutex_init(&cnf->playlock); ast_mutex_init(&cnf->listenlock); ast_copy_string(cnf->confno, confno, sizeof(cnf->confno)); - ast_copy_string(cnf->pin, pin, sizeof(cnf->pin)); - ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin)); + ast_copy_string(cnf->pin, pin ? pin : "", sizeof(cnf->pin)); + ast_copy_string(cnf->pinadmin, pinadmin ? pinadmin : "", sizeof(cnf->pinadmin)); cnf->refcount = 0; cnf->markedusers = 0; cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL); @@ -1779,7 +1779,7 @@ } ast_variables_destroy(var); - cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount); + cnf = build_conf(confno, pin, pinadmin, make, dynamic, refcount); } return cnf; @@ -1819,9 +1819,7 @@ if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0) < 0) return NULL; } - cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount); - } else { - cnf = build_conf(confno, "", "", make, dynamic, refcount); + cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount); } } else { /* Check the config */ @@ -1839,19 +1837,18 @@ return NULL; AST_STANDARD_APP_ARGS(args, parse); + + /* If we only get one argument back, try parsing using a comma as a delimiter instead */ + + if ((args.argc == 1) && index(parse, ',')) { + + /* Since only 1 arg was found, "parse" is still whole/intact */ + AST_NONSTANDARD_APP_ARGS(args, parse, ','); + } + if (!strcasecmp(args.confno, confno)) { /* Bingo it's a valid conference */ - if (args.pin) { - if (args.pinadmin) - cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic, refcount); - else - cnf = build_conf(args.confno, args.pin, "", make, dynamic, refcount); - } else { - if (args.pinadmin) - cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic, refcount); - else - cnf = build_conf(args.confno, "", "", make, dynamic, refcount); - } + cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic, refcount); break; } } @@ -2026,7 +2023,7 @@ AST_LIST_UNLOCK(&confs); if (!found) { /* At this point, we have a confno_tmp (static conference) that is empty */ - if ((empty_no_pin && ((!stringp) || (stringp && (stringp[0] == '\0')))) || (!empty_no_pin)) { + if ((empty_no_pin && ast_strlen_zero(stringp)) || (!empty_no_pin)) { /* Case 1: empty_no_pin and pin is nonexistent (NULL) * Case 2: empty_no_pin and pin is blank (but not NULL) * Case 3: not empty_no_pin