[asterisk-commits] mogorman: trunk r40107 - in /trunk: apps/app_voicemail.c doc/imapstorage.txt

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Aug 16 13:32:20 MST 2006


Author: mogorman
Date: Wed Aug 16 15:32:19 2006
New Revision: 40107

URL: http://svn.digium.com/view/asterisk?rev=40107&view=rev
Log:
fixed imap bug and updated syntax.

Modified:
    trunk/apps/app_voicemail.c
    trunk/doc/imapstorage.txt

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=40107&r1=40106&r2=40107&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Wed Aug 16 15:32:19 2006
@@ -2355,7 +2355,7 @@
 
 #else
 #ifdef IMAP_STORAGE
-static int messagecount(const char *mailbox, int *newmsgs, int *oldmsgs)
+static int count_messages_imap(const char *mailbox, int *newmsgs, int *oldmsgs)
 {
    	SEARCHPGM *pgm;
    	SEARCHHEADER *hdr;
@@ -2383,7 +2383,7 @@
  		ret = 0;
  		while((cur = strsep(&mb, ", "))) {
  			if (!ast_strlen_zero(cur)) {
- 				if (messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
+ 				if (count_messages_imap(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
  					return -1;
  				else {
  					if (newmsgs)
@@ -2507,13 +2507,6 @@
  	}
  	return 0;
  }
-#else
-
-static int messagecount(const char *context, const char *mailbox, const char *folder)
-{
-	return __has_voicemail(context, mailbox, folder, 0);
-}
-
 #endif
 #endif
 
@@ -2553,6 +2546,13 @@
 }
 
 #ifndef ODBC_STORAGE
+
+static int messagecount(const char *context, const char *mailbox, const char *folder)
+{
+	return __has_voicemail(context, mailbox, folder, 0);
+}
+
+
 static int __has_voicemail(const char *context, const char *mailbox, const char *folder, int shortcircuit)
 {
 	DIR *dir;
@@ -2879,7 +2879,7 @@
 			oldmsgs = vms->oldmessages;
 		} else {
 			ast_log(LOG_DEBUG, "About to call messagecount.\n");
-			res = messagecount(ext, &newmsgs, &oldmsgs);
+			res = count_messages_imap(ext, &newmsgs, &oldmsgs);
 			if(res < 0) {
 				ast_log(LOG_NOTICE,"Can not leave voicemail, unable to count messages\n");
 				return -1;
@@ -8513,7 +8513,7 @@
 	for (x = 0; x<256; x++) {
 		if (vms->msgArray[x]!=0) {
   			ast_log (LOG_DEBUG, "Item %d set to %ld\n",x,vms->msgArray[x]);
-		};
+		}
 	}
   	ast_log (LOG_DEBUG, "Check complete.\n");
 }

Modified: trunk/doc/imapstorage.txt
URL: http://svn.digium.com/view/asterisk/trunk/doc/imapstorage.txt?rev=40107&r1=40106&r2=40107&view=diff
==============================================================================
--- trunk/doc/imapstorage.txt (original)
+++ trunk/doc/imapstorage.txt Wed Aug 16 15:32:19 2006
@@ -53,14 +53,12 @@
 ------------------
 Compiling Asterisk 
 ------------------
-Uncomment the following lines in apps/Makefile:
 
-USE_IMAP_VM_INTERFACE=1
-UWCLIENT_HOME=/usr/src/imap/c-client <- path to c-client.a (above)
-CFLAGS+=-DUSE_IMAP_STORAGE
-
-Type "make" in the asterisk directory.  Do not attempt to make from the
-asterisk/apps directory.
+Configure with ./configure --with-imap=/usr/src/imap
+or where ever you built the University of Washington IMAP C-Client.
+Then make menuselect go to voicemail options and check the imap box
+then make, make install and asterisk will have imap storage support for 
+voicemail.
 
 ---------------------
 Modify voicemail.conf



More information about the asterisk-commits mailing list