dect
/
asterisk
Archived
13
0
Fork 0

Fix unit test that Alec Davis broke.

(closes issue #16927)
 Reported by: alecdavis


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@249491 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
tilghman 2010-02-28 20:50:01 +00:00
parent a55aaaea71
commit 0d3f019183
1 changed files with 4 additions and 1 deletions

View File

@ -2023,7 +2023,7 @@ static int __messagecount(const char *context, const char *mailbox, const char *
*/
static int messagecount(const char *context, const char *mailbox, const char *folder)
{
if (!strcmp(folder, "INBOX")) {
if (ast_strlen_zero(folder) || !strcmp(folder, "INBOX")) {
return __messagecount(context, mailbox, "INBOX") + __messagecount(context, mailbox, "Urgent");
} else {
return __messagecount(context, mailbox, folder);
@ -5130,6 +5130,9 @@ static int has_voicemail(const char *mailbox, const char *folder)
{
char tmp[256], *tmp2 = tmp, *box, *context;
ast_copy_string(tmp, mailbox, sizeof(tmp));
if (ast_strlen_zero(folder)) {
folder = "INBOX";
}
while ((box = strsep(&tmp2, ",&"))) {
if ((context = strchr(box, '@')))
*context++ = '\0';