[asterisk-commits] mmichelson: trunk r94345 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 20 17:43:25 CST 2007


Author: mmichelson
Date: Thu Dec 20 17:43:24 2007
New Revision: 94345

URL: http://svn.digium.com/view/asterisk?view=rev&rev=94345
Log:
The changes to header inclusion in trunk broke compilation of app_voicemail when using
IMAP storage. The reason is that c-client has its own definitions for LOG_WARNING
and LOG_DEBUG, so we need to be sure to include asterisk's definitions last so that
we use the proper values in app_voicemail.

(closes issue #11437, reported by blitzrage, patch suggested by blitzrage)


Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=94345&r1=94344&r2=94345
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Dec 20 17:43:24 2007
@@ -61,17 +61,12 @@
 </category>
  ***/
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/paths.h"	/* use ast_config_AST_SPOOL_DIR */
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <time.h>
-#include <dirent.h>
-
+/*It is important to include the IMAP_STORAGE related headers
+ * before asterisk.h since asterisk.h includes logger.h. logger.h
+ * and c-client.h have conflicting definitions for LOG_WARNING and
+ * LOG_DEBUG, so it's important that we use Asterisk's definitions
+ * here instead of the c-client's 
+ */
 #ifdef IMAP_STORAGE
 #include <ctype.h>
 #include <signal.h>
@@ -86,6 +81,17 @@
 #include "linkage.h"
 #endif
 #endif
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/paths.h"	/* use ast_config_AST_SPOOL_DIR */
+#include <sys/time.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <time.h>
+#include <dirent.h>
 
 #include "asterisk/lock.h"
 #include "asterisk/file.h"




More information about the asterisk-commits mailing list