[asterisk-commits] mmichelson: branch 1.4 r94543 - /branches/1.4/apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 21 14:22:00 CST 2007
Author: mmichelson
Date: Fri Dec 21 14:21:59 2007
New Revision: 94543
URL: http://svn.digium.com/view/asterisk?view=rev&rev=94543
Log:
Bunch of coding guidelines cleanup
Modified:
branches/1.4/apps/app_voicemail.c
Modified: branches/1.4/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_voicemail.c?view=diff&rev=94543&r1=94542&r2=94543
==============================================================================
--- branches/1.4/apps/app_voicemail.c (original)
+++ branches/1.4/apps/app_voicemail.c Fri Dec 21 14:21:59 2007
@@ -888,7 +888,7 @@
ast_log(LOG_WARNING, "msgnum %d, mailbox message %lu is zero.\n",msgnum,messageNum);
return;
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "deleting msgnum %d, which is mailbox message %lu\n",msgnum,messageNum);
/* delete message */
snprintf (arg, sizeof(arg), "%lu",messageNum);
@@ -1843,7 +1843,7 @@
else
fprintf(p, "Subject: [PBX]: New message %d in mailbox %s" ENDL, msgnum + 1, mailbox);
fprintf(p, "Message-ID: <Asterisk-%d-%d-%s-%d@%s>" ENDL, msgnum + 1, (unsigned int)ast_random(), mailbox, (int)getpid(), host);
- if(imap) {
+ if (imap) {
/* additional information needed for IMAP searching */
fprintf(p, "X-Asterisk-VM-Message-Num: %d" ENDL, msgnum + 1);
/* fprintf(p, "X-Asterisk-VM-Orig-Mailbox: %s" ENDL, ext); */
@@ -2126,7 +2126,7 @@
/*assume a NULL folder means INBOX*/
if (!folder)
return 0;
- if(!strcasecmp(folder, "INBOX"))
+ if (!strcasecmp(folder, "INBOX"))
return 0;
else if (!strcasecmp(folder, "Old"))
return 1;
@@ -2317,7 +2317,7 @@
STRING str;
/*Greetings are not retrieved from IMAP, so there is no reason to attempt storing them there either*/
- if(msgnum < 0)
+ if (msgnum < 0)
return 0;
/* Attach only the first format */
@@ -2341,13 +2341,13 @@
if (!strcmp(fmt, "wav49"))
fmt = "WAV";
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Storing file '%s', format '%s'\n", fn, fmt);
/* Make a temporary file instead of piping directly to sendmail, in case the mail
command hangs */
if ((p = vm_mkftemp(tmp)) == NULL) {
ast_log(LOG_WARNING, "Unable to store '%s' (can't create temporary file)\n", fn);
- if(tempcopy)
+ if (tempcopy)
*(vmu->email) = '\0';
return -1;
} else {
@@ -2355,7 +2355,7 @@
/* read mail file to memory */
len = ftell(p);
rewind(p);
- if((buf = ast_malloc(len+1)) == NIL) {
+ if ((buf = ast_malloc(len+1)) == NIL) {
ast_log(LOG_ERROR, "Can't allocate %ld bytes to read message\n", len+1);
fclose(p);
return -1;
@@ -2365,15 +2365,15 @@
INIT(&str, mail_string, buf, len);
init_mailstream(vms, 0);
imap_mailbox_name(mailbox, sizeof(mailbox), vms, 0, 1);
- if(!mail_append(vms->mailstream, mailbox, &str))
+ if (!mail_append(vms->mailstream, mailbox, &str))
ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
fclose(p);
unlink(tmp);
ast_free(buf);
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "%s stored\n", fn);
}
- if(tempcopy)
+ if (tempcopy)
*(vmu->email) = '\0';
return 0;
@@ -2412,12 +2412,12 @@
vms_p = get_vm_state_by_mailbox(mailbox,1);
}
if (vms_p) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Returning before search - user is logged in\n");
- if(fold == 0) {/*INBOX*/
+ if (fold == 0) {/*INBOX*/
return vms_p->newmessages;
}
- if(fold == 1) {/*Old messages*/
+ if (fold == 1) {/*Old messages*/
return vms_p->oldmessages;
}
}
@@ -2429,7 +2429,7 @@
}
if (!vms_p) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Adding new vmstate for %s\n",vmu->imapuser);
if (!(vms_p = ast_calloc(1, sizeof(*vms_p)))) {
return -1;
@@ -2437,7 +2437,7 @@
ast_copy_string(vms_p->imapuser,vmu->imapuser, sizeof(vms_p->imapuser));
ast_copy_string(vms_p->username, mailbox, sizeof(vms_p->username)); /* save for access from interactive entry point */
vms_p->mailstream = NIL; /* save for access from interactive entry point */
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Copied %s to %s\n",vmu->imapuser,vms_p->imapuser);
vms_p->updated = 1;
/* set mailbox to INBOX! */
@@ -2470,9 +2470,9 @@
vms_p->vmArrayIndex = 0;
mail_search_full (vms_p->mailstream, NULL, pgm, NIL);
- if(fold == 0)
+ if (fold == 0)
vms_p->newmessages = vms_p->vmArrayIndex;
- if(fold == 1)
+ if (fold == 1)
vms_p->oldmessages = vms_p->vmArrayIndex;
/*Freeing the searchpgm also frees the searchhdr*/
mail_free_searchpgm(&pgm);
@@ -2495,7 +2495,7 @@
if (oldmsgs)
*oldmsgs = 0;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Mailbox is set to %s\n",mailbox_context);
/* If no mailbox, return immediately */
if (ast_strlen_zero(mailbox_context))
@@ -2507,7 +2507,7 @@
int tmpnew, tmpold;
ast_copy_string(tmp, mailbox_context, sizeof(tmp));
mb = tmp;
- while((cur = strsep(&mb, ", "))) {
+ while ((cur = strsep(&mb, ", "))) {
if (!ast_strlen_zero(cur)) {
if (inboxcount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
return -1;
@@ -2530,11 +2530,11 @@
mailboxnc = (char *)mailbox_context;
}
if (newmsgs) {
- if((*newmsgs = messagecount(context, mailboxnc, "INBOX")) < 0)
+ if ((*newmsgs = messagecount(context, mailboxnc, "INBOX")) < 0)
return -1;
}
if (oldmsgs) {
- if((*oldmsgs = messagecount(context, mailboxnc, "Old")) < 0)
+ if ((*oldmsgs = messagecount(context, mailboxnc, "Old")) < 0)
return -1;
}
return 0;
@@ -2546,9 +2546,9 @@
char tmp[256], *tmp2, *mbox, *context;
ast_copy_string(tmp, mailbox, sizeof(tmp));
tmp2 = tmp;
- if(strchr(tmp2, ',')) {
- while((mbox = strsep(&tmp2, ","))) {
- if(!ast_strlen_zero(mbox)) {
+ if (strchr(tmp2, ',')) {
+ while ((mbox = strsep(&tmp2, ","))) {
+ if (!ast_strlen_zero(mbox)) {
if (has_voicemail(mbox, folder))
return 1;
}
@@ -2565,22 +2565,20 @@
{
struct vm_state *sendvms = NULL, *destvms = NULL;
char messagestring[10]; /*I guess this could be a problem if someone has more than 999999999 messages...*/
- if(msgnum >= recip->maxmsg) {
+ if (msgnum >= recip->maxmsg) {
ast_log(LOG_WARNING, "Unable to copy mail, mailbox %s is full\n", recip->mailbox);
return -1;
}
- if(!(sendvms = get_vm_state_by_imapuser(vmu->imapuser, 2)))
- {
+ if (!(sendvms = get_vm_state_by_imapuser(vmu->imapuser, 2))) {
ast_log(LOG_ERROR, "Couldn't get vm_state for originator's mailbox!!\n");
return -1;
}
- if(!(destvms = get_vm_state_by_imapuser(recip->imapuser, 2)))
- {
+ if (!(destvms = get_vm_state_by_imapuser(recip->imapuser, 2))) {
ast_log(LOG_ERROR, "Couldn't get vm_state for destination mailbox!\n");
return -1;
}
snprintf(messagestring, sizeof(messagestring), "%ld", sendvms->msgArray[msgnum]);
- if((mail_copy(sendvms->mailstream, messagestring, (char *) mbox(imbox)) == T))
+ if ((mail_copy(sendvms->mailstream, messagestring, (char *) mbox(imbox)) == T))
return 0;
ast_log(LOG_WARNING, "Unable to copy message from mailbox %s to mailbox %s\n", vmu->mailbox, recip->mailbox);
return -1;
@@ -2822,7 +2820,7 @@
category = pbx_builtin_getvar_helper(chan, "VM_CATEGORY");
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Before find_user\n");
if (!(vmu = find_user(&svm, context, ext))) {
ast_log(LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
@@ -2976,11 +2974,11 @@
/* Is ext a mailbox? */
/* must open stream for this user to get info! */
res = inboxcount(ext_context, &newmsgs, &oldmsgs);
- if(res < 0) {
+ if (res < 0) {
ast_log(LOG_NOTICE,"Can not leave voicemail, unable to count messages\n");
return -1;
}
- if(!(vms = get_vm_state_by_mailbox(ext,0))) {
+ if (!(vms = get_vm_state_by_mailbox(ext,0))) {
/*It is possible under certain circumstances that inboxcount did not create a vm_state when it was needed. This is a catchall which will
* rarely be used*/
if (!(vms = ast_calloc(1, sizeof(*vms)))) {
@@ -3010,12 +3008,12 @@
/* Check if mailbox is full */
check_quota(vms, imapfolder);
if (vms->quota_limit && vms->quota_usage >= vms->quota_limit) {
- if(option_debug)
+ if (option_debug)
ast_log(LOG_DEBUG, "*** QUOTA EXCEEDED!! %u >= %u\n", vms->quota_usage, vms->quota_limit);
ast_play_and_wait(chan, "vm-mailboxfull");
return -1;
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Checking message number quota - mailbox has %d messages, maximum is set to %d\n",msgnum,vmu->maxmsg);
if (msgnum >= vmu->maxmsg) {
res = ast_streamfile(chan, "vm-mailboxfull", chan->language);
@@ -3238,7 +3236,7 @@
if (box == 1) return 10;
/* get the real IMAP message number for this message */
snprintf(sequence, sizeof(sequence), "%ld", vms->msgArray[msg]);
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Copying sequence %s to mailbox %s\n",sequence,(char *) mbox(box));
res = mail_copy(vms->mailstream,sequence,(char *) mbox(box));
if (res == 1) return 0;
@@ -4112,7 +4110,7 @@
char *myserveremail;
int attach_user_voicemail;
/* Need to get message content */
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n",vms->curmsg, vms->msgArray[vms->curmsg]);
if (vms->msgArray[vms->curmsg] == 0) {
ast_log (LOG_WARNING,"Trying to access unknown message\n");
@@ -4144,13 +4142,13 @@
}
if (!strcasecmp(fmt, "wav49"))
fmt = "WAV";
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"**** format set to %s, vmfmts set to %s\n",fmt,vmfmts);
/* ast_copy_string(fmt, vmfmts, sizeof(fmt));*/
/* if (!ast_strlen_zero(fmt)) { */
snprintf(todir, sizeof(todir), "%s%s/%s/tmp", VM_SPOOL_DIR, vmtmp->context, vmtmp->mailbox);
make_gsm_file(vms->fn, sizeof(vms->fn), vms->imapuser, todir, vms->curmsg);
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Before mail_fetchstructure, message number is %ld, filename is:%s\n",vms->msgArray[vms->curmsg], vms->fn);
/*mail_fetchstructure (mailstream, vmArray[0], &body); */
mail_fetchstructure (vms->mailstream, vms->msgArray[vms->curmsg], &body);
@@ -4441,7 +4439,7 @@
char *temp;
vms->starting = 0;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n",vms->curmsg, vms->msgArray[vms->curmsg]);
if (vms->msgArray[vms->curmsg] == 0) {
ast_log (LOG_WARNING,"Trying to access unknown message\n");
@@ -4688,7 +4686,7 @@
/* End with username */
ast_build_string(&t, &left, "/user=%s}", vms->imapuser);
- if(box == 0 || box == 1)
+ if (box == 0 || box == 1)
snprintf(spec, len, "%s%s", tmp, use_folder? imapfolder: "INBOX");
else
snprintf(spec, len, "%s%s%c%s", tmp, imapfolder, delimiter, mbox(box));
@@ -4704,7 +4702,7 @@
ast_log (LOG_ERROR,"vm_state is NULL!\n");
return -1;
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"vm_state user is:%s\n",vms->imapuser);
if (vms->mailstream == NIL || !vms->mailstream) {
if (option_debug)
@@ -4727,13 +4725,13 @@
}
get_mailbox_delimiter(stream);
/* update delimiter in imapfolder */
- for(cp = imapfolder; *cp; cp++)
- if(*cp == '/')
+ for (cp = imapfolder; *cp; cp++)
+ if (*cp == '/')
*cp = delimiter;
}
/* Now connect to the target folder */
imap_mailbox_name(tmp, sizeof(tmp), vms, box, 1);
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Before mail_open, server: %s, box:%d\n", tmp, box);
vms->mailstream = mail_open (stream, tmp, debug ? OP_DEBUG : NIL);
if (vms->mailstream == NIL) {
@@ -4750,7 +4748,7 @@
int ret;
ast_copy_string(vms->imapuser,vmu->imapuser, sizeof(vms->imapuser));
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG,"Before init_mailstream, user is %s\n",vmu->imapuser);
ret = init_mailstream(vms, box);
if (ret != 0 || !vms->mailstream) {
@@ -4783,7 +4781,7 @@
}
vms->vmArrayIndex = 0;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG,"Before mail_search_full, user is %s\n",vmu->imapuser);
mail_search_full (vms->mailstream, NULL, pgm, NIL);
@@ -4888,7 +4886,7 @@
if (vms->deleted) {
for (x=0;x < vmu->maxmsg;x++) {
if (vms->deleted[x]) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG,"IMAP delete of %d\n",x);
IMAP_DELETE(vms->curdir, x, vms->fn, vms);
}
@@ -6102,7 +6100,7 @@
ast_log(LOG_WARNING, "Failed to create directory (%s).\n", prefile);
return -1;
}
- while((cmd >= 0) && (cmd != 't')) {
+ while ((cmd >= 0) && (cmd != 't')) {
if (cmd)
retries = 0;
RETRIEVE(prefile, -1);
@@ -6584,7 +6582,7 @@
}
}
#ifdef IMAP_STORAGE
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Checking quotas: comparing %u to %u\n",vms.quota_usage,vms.quota_limit);
if (vms.quota_limit && vms.quota_usage >= vms.quota_limit) {
if (option_debug)
@@ -6913,7 +6911,7 @@
}
#ifdef IMAP_STORAGE
/* expunge message - use UID Expunge if supported on IMAP server*/
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "*** Checking if we can expunge, deleted set to %d, expungeonhangup set to %d\n",deleted,expungeonhangup);
if (vmu && deleted == 1 && expungeonhangup == 1) {
#ifdef HAVE_IMAP_TK2006
@@ -7445,7 +7443,7 @@
}
/* Expunge on exit */
if ((expunge_on_hangup = ast_variable_retrieve(cfg, "general", "expungeonhangup"))) {
- if(ast_false(expunge_on_hangup))
+ if (ast_false(expunge_on_hangup))
expungeonhangup = 0;
else
expungeonhangup = 1;
@@ -7962,7 +7960,7 @@
#ifdef IMAP_STORAGE
/* START HERE */
/* get the message info!! */
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG,"Before mail_fetchheaders, curmsg is: %d, imap messages is %lu\n",vms->curmsg, vms->msgArray[vms->curmsg]);
if (vms->msgArray[vms->curmsg] == 0) {
ast_log (LOG_WARNING,"Trying to access unknown message\n");
@@ -8412,7 +8410,7 @@
user = get_user_by_mailbox(mailbox);
vms = get_vm_state_by_imapuser(user,2);
if (vms) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG, "saving mailbox message number %lu as message %d. Interactive set to %d\n",number,vms->vmArrayIndex,vms->interactive);
vms->msgArray[vms->vmArrayIndex++] = number;
} else {
@@ -8559,7 +8557,7 @@
void mm_exists(MAILSTREAM * stream, unsigned long number)
{
/* mail_ping will callback here if new mail! */
- if(option_debug > 3)
+ if (option_debug > 3)
ast_log (LOG_DEBUG, "Entering EXISTS callback for message %ld\n", number);
if (number == 0) return;
set_update(stream);
@@ -8569,7 +8567,7 @@
void mm_expunged(MAILSTREAM * stream, unsigned long number)
{
/* mail_ping will callback here if expunged mail! */
- if(option_debug > 3)
+ if (option_debug > 3)
ast_log (LOG_DEBUG, "Entering EXPUNGE callback for message %ld\n", number);
if (number == 0) return;
set_update(stream);
@@ -8579,7 +8577,7 @@
void mm_flags(MAILSTREAM * stream, unsigned long number)
{
/* mail_ping will callback here if read mail! */
- if(option_debug > 3)
+ if (option_debug > 3)
ast_log (LOG_DEBUG, "Entering FLAGS callback for message %ld\n", number);
if (number == 0) return;
set_update(stream);
@@ -8648,7 +8646,7 @@
{
switch ((short) errflg) {
case NIL:
- if(option_debug)
+ if (option_debug)
ast_log(LOG_DEBUG,"IMAP Info: %s\n", string);
break;
case PARSE:
@@ -8672,7 +8670,7 @@
{
struct ast_vm_user *vmu;
- if(option_debug > 3)
+ if (option_debug > 3)
ast_log(LOG_DEBUG, "Entering callback mm_login\n");
ast_copy_string(user, mb->user, MAILTMPLEN);
@@ -8682,7 +8680,7 @@
ast_copy_string(pwd, authpassword, MAILTMPLEN);
} else {
AST_LIST_TRAVERSE(&users, vmu, list) {
- if(!strcasecmp(mb->user, vmu->imapuser)) {
+ if (!strcasecmp(mb->user, vmu->imapuser)) {
ast_copy_string(pwd, vmu->imappassword, MAILTMPLEN);
break;
}
@@ -8738,7 +8736,7 @@
user = get_user_by_mailbox(mailbox);
vms = get_vm_state_by_imapuser(user,2);
if (vms) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG, "User %s usage is %lu, limit is %lu\n",user,usage,limit);
vms->quota_usage = usage;
vms->quota_limit = limit;
@@ -8819,16 +8817,16 @@
}
}
} else {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " error: imapuser is NULL for %s\n",user);
}
} else {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " error: vms is NULL for %s\n",user);
}
vlist = vlist->next;
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "%s not found in vmstates\n",user);
return NULL;
}
@@ -8838,29 +8836,29 @@
struct vmstate *vlist = NULL;
vlist = vmstates;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Mailbox set to %s\n",mailbox);
while (vlist) {
if (vlist->vms) {
if (vlist->vms->username) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " comparing mailbox %s (i=%d) to vmstate mailbox %s (i=%d)\n",mailbox,interactive,vlist->vms->username,vlist->vms->interactive);
if (!strcmp(vlist->vms->username,mailbox) && vlist->vms->interactive == interactive) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " Found it!\n");
return vlist->vms;
}
} else {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " error: username is NULL for %s\n",mailbox);
}
} else {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, " error: vms is NULL for %s\n",mailbox);
}
vlist = vlist->next;
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "%s not found in vmstates\n",mailbox);
return NULL;
}
@@ -8876,16 +8874,16 @@
if (vms->interactive == 1) {
altvms = get_vm_state_by_mailbox(vms->username,0);
if (altvms) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Duplicate mailbox %s, copying message info...\n",vms->username);
vms->newmessages = altvms->newmessages;
vms->oldmessages = altvms->oldmessages;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "check_msgArray before memcpy\n");
check_msgArray(vms);
/* memcpy(vms->msgArray, altvms->msgArray, sizeof(long)*256); */
copy_msgArray(vms, altvms);
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "check_msgArray after memcpy\n");
check_msgArray(vms);
vms->vmArrayIndex = altvms->vmArrayIndex;
@@ -8903,7 +8901,7 @@
if (!v) {
ast_log(LOG_ERROR, "Out of memory\n");
}
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Inserting vm_state for user:%s, mailbox %s\n",vms->imapuser,vms->username);
ast_mutex_lock(&vmstate_lock);
v->vms = vms;
@@ -8922,7 +8920,7 @@
if (vms->interactive == 1) {
altvms = vms->persist_vms;
if (altvms) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Duplicate mailbox %s, copying message info...\n",vms->username);
altvms->newmessages = vms->newmessages;
altvms->oldmessages = vms->oldmessages;
@@ -8932,7 +8930,7 @@
ast_mutex_lock(&vmstate_lock);
vc = vmstates;
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log(LOG_DEBUG, "Removing vm_state for user:%s, mailbox %s\n",vms->imapuser,vms->username);
while (vc) {
if (vc->vms == vms) {
@@ -8964,11 +8962,11 @@
user = get_user_by_mailbox(mailbox);
vms = get_vm_state_by_imapuser(user, 0);
if (vms) {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_DEBUG, "User %s mailbox set for update.\n",user);
vms->updated = 1; /* set updated flag since mailbox changed */
} else {
- if(option_debug > 2)
+ if (option_debug > 2)
ast_log (LOG_WARNING, "User %s mailbox not found for update.\n",user);
}
}
@@ -8987,7 +8985,7 @@
int x;
for (x = 0; x<256; x++) {
if (vms->msgArray[x]!=0) {
- if(option_debug)
+ if (option_debug)
ast_log (LOG_DEBUG, "Item %d set to %ld\n",x,vms->msgArray[x]);
}
}
More information about the asterisk-commits
mailing list