[asterisk-commits] seanbright: branch seanbright/resolve-shadow-warnings r114583 - in /team/sean...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 23 10:17:00 CDT 2008


Author: seanbright
Date: Wed Apr 23 10:16:59 2008
New Revision: 114583

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114583
Log:
Merged revisions 114572,114575,114577,114580 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r114572 | tilghman | 2008-04-22 19:58:19 -0400 (Tue, 22 Apr 2008) | 10 lines

Merged revisions 114571 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114571 | tilghman | 2008-04-22 18:51:44 -0500 (Tue, 22 Apr 2008) | 2 lines

Treat a 502 just like a 503, when it comes to processing a response code

........

................
r114575 | mmichelson | 2008-04-22 20:40:30 -0400 (Tue, 22 Apr 2008) | 10 lines

Round 1 of IMAP_STORAGE-related app_voicemail changes

This makes IMAP_STORAGE include the proper headers if you
have specified the "system" option for --with-imap when running
the configure script and your IMAP-related headers exist in 
/usr/include/c-client.

This change is due to a hasty merge of a 1.4 change I made.


................
r114577 | mmichelson | 2008-04-22 20:58:49 -0400 (Tue, 22 Apr 2008) | 23 lines

Round 2 of IMAP_STORAGE app_voicemail.c fixes:

This fixes a bug that was thought to be fixed already.

app_voicemail, if using IMAP_STORAGE, has a problem because
the IMAP header files include syslog.h, which define LOG_WARNING
and LOG_DEBUG to be different than what Asterisk uses for those
same macros. This was "fixed" in the past by including all the 
IMAP header files prior to including asterisk.h. This fix worked...
unless you were to try to compile with MALLOC_DEBUG. MALLOC_DEBUG
prepends the inclusion of astmm.h to every file, which means that no
matter what order the includes are in in app_voicemail, the unexpected
values for LOG_WARNING and LOG_DEBUG will be in place.

The action taken for this fix was to define AST_LOG_* macros in addition
to the LOG_* macros already defined. These new macros are used in app_voicemail.c,
logger.h, and astobj.h right now, and their use will be encouraged in the future.

In consideration of those who have written third-party modules which use 
the LOG_* macros, these will NOT be removed from the source, however future use
of these macros is discouraged.


................
r114580 | file | 2008-04-23 10:55:03 -0400 (Wed, 23 Apr 2008) | 12 lines

Merged revisions 114579 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114579 | file | 2008-04-23 11:54:11 -0300 (Wed, 23 Apr 2008) | 4 lines

Instead of stopping dialplan execution when SayNumber attempts to say a large number that it can not print out a message informing the user and continue on.
(closes issue #12502)
Reported by: bcnit

........

................

Modified:
    team/seanbright/resolve-shadow-warnings/   (props changed)
    team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
    team/seanbright/resolve-shadow-warnings/channels/chan_sip.c
    team/seanbright/resolve-shadow-warnings/include/asterisk/astobj.h
    team/seanbright/resolve-shadow-warnings/include/asterisk/logger.h
    team/seanbright/resolve-shadow-warnings/main/pbx.c

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/seanbright/resolve-shadow-warnings/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Apr 23 10:16:59 2008
@@ -1,1 +1,1 @@
-/trunk:1-114569
+/trunk:1-114582

Modified: team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c?view=diff&rev=114583&r1=114582&r2=114583
==============================================================================
--- team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c (original)
+++ team/seanbright/resolve-shadow-warnings/apps/app_voicemail.c Wed Apr 23 10:16:59 2008
@@ -63,8 +63,8 @@
 
 /* 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
+ * and c-client.h have conflicting definitions for AST_LOG_WARNING and
+ * AST_LOG_DEBUG, so it's important that we use Asterisk's definitions
  * here instead of the c-client's 
  */
 #ifdef IMAP_STORAGE
@@ -75,6 +75,10 @@
 #include <imap/c-client.h>
 #include <imap/imap4r1.h>
 #include <imap/linkage.h>
+#elif defined (USE_SYSTEM_CCLIENT)
+#include <c-client/c-client.h>
+#include <c-client/imap4r1.h>
+#include <c-client/linkage.h>
 #else
 #include "c-client.h"
 #include "imap4r1.h"
@@ -755,7 +759,7 @@
 		if (sscanf(value, "%d", &x) == 1) {
 			vmu->saydurationm = x;
 		} else {
-			ast_log(LOG_WARNING, "Invalid min duration for say duration\n");
+			ast_log(AST_LOG_WARNING, "Invalid min duration for say duration\n");
 		}
 	} else if (!strcasecmp(var, "forcename")) {
 		ast_set2_flag(vmu, ast_true(value), VM_FORCENAME);	
@@ -769,20 +773,20 @@
 		ast_copy_string(vmu->exit, value, sizeof(vmu->exit));
 	} else if (!strcasecmp(var, "maxmessage") || !strcasecmp(var, "maxsecs")) {
 		if (vmu->maxsecs <= 0) {
-			ast_log(LOG_WARNING, "Invalid max message length of %s. Using global value %d\n", value, vmmaxsecs);
+			ast_log(AST_LOG_WARNING, "Invalid max message length of %s. Using global value %d\n", value, vmmaxsecs);
 			vmu->maxsecs = vmmaxsecs;
 		} else {
 			vmu->maxsecs = atoi(value);
 		}
 		if (!strcasecmp(var, "maxmessage"))
-			ast_log(LOG_WARNING, "Option 'maxmessage' has been deprecated in favor of 'maxsecs'.  Please make that change in your voicemail config.\n");
+			ast_log(AST_LOG_WARNING, "Option 'maxmessage' has been deprecated in favor of 'maxsecs'.  Please make that change in your voicemail config.\n");
 	} else if (!strcasecmp(var, "maxmsg")) {
 		vmu->maxmsg = atoi(value);
 		if (vmu->maxmsg <= 0) {
-			ast_log(LOG_WARNING, "Invalid number of messages per folder maxmsg=%s. Using default value %d\n", value, MAXMSG);
+			ast_log(AST_LOG_WARNING, "Invalid number of messages per folder maxmsg=%s. Using default value %d\n", value, MAXMSG);
 			vmu->maxmsg = MAXMSG;
 		} else if (vmu->maxmsg > MAXMSGLIMIT) {
-			ast_log(LOG_WARNING, "Maximum number of messages per folder is %d. Cannot accept value maxmsg=%s\n", MAXMSGLIMIT, value);
+			ast_log(AST_LOG_WARNING, "Maximum number of messages per folder is %d. Cannot accept value maxmsg=%s\n", MAXMSGLIMIT, value);
 			vmu->maxmsg = MAXMSGLIMIT;
 		}
 	} else if (!strcasecmp(var, "backupdeleted")) {
@@ -794,10 +798,10 @@
 			vmu->maxdeletedmsg = 0;
 
 		if (vmu->maxdeletedmsg < 0) {
-			ast_log(LOG_WARNING, "Invalid number of deleted messages saved per mailbox backupdeleted=%s. Using default value %d\n", value, MAXMSG);
+			ast_log(AST_LOG_WARNING, "Invalid number of deleted messages saved per mailbox backupdeleted=%s. Using default value %d\n", value, MAXMSG);
 			vmu->maxdeletedmsg = MAXMSG;
 		} else if (vmu->maxdeletedmsg > MAXMSGLIMIT) {
-			ast_log(LOG_WARNING, "Maximum number of deleted messages saved per mailbox is %d. Cannot accept value backupdeleted=%s\n", MAXMSGLIMIT, value);
+			ast_log(AST_LOG_WARNING, "Maximum number of deleted messages saved per mailbox is %d. Cannot accept value backupdeleted=%s\n", MAXMSGLIMIT, value);
 			vmu->maxdeletedmsg = MAXMSGLIMIT;
 		}
 	} else if (!strcasecmp(var, "volgain")) {
@@ -901,7 +905,7 @@
 
 	for (i = 0; i < strlen(key); ++i) {
 		if (!strchr(VALID_DTMF, *local_key)) {
-			ast_log(LOG_WARNING, "Invalid DTMF key \"%c\" used in voicemail configuration file\n", *local_key);
+			ast_log(AST_LOG_WARNING, "Invalid DTMF key \"%c\" used in voicemail configuration file\n", *local_key);
 			return 0;
 		}
 		local_key++;
@@ -1036,18 +1040,18 @@
 		while ((category = ast_category_browse(cfg, category))) {
 			if (!strcasecmp(category, vmu->context)) {
 				if (!(tmp = ast_variable_retrieve(cfg, category, vmu->mailbox))) {
-					ast_log(LOG_WARNING, "We could not find the mailbox.\n");
+					ast_log(AST_LOG_WARNING, "We could not find the mailbox.\n");
 					break;
 				}
 				value = strstr(tmp, ",");
 				if (!value) {
-					ast_log(LOG_WARNING, "variable has bad format.\n");
+					ast_log(AST_LOG_WARNING, "variable has bad format.\n");
 					break;
 				}
 				new = alloca(strlen(value) + strlen(newpassword) + 1);
 				sprintf(new, "%s%s", newpassword, value);
 				if (!(cat = ast_category_get(cfg, category))) {
-					ast_log(LOG_WARNING, "Failed to get category structure.\n");
+					ast_log(AST_LOG_WARNING, "Failed to get category structure.\n");
 					break;
 				}
 				ast_variable_update(cat, vmu->mailbox, new, NULL, 0);
@@ -1121,7 +1125,7 @@
 {
 	int res;
 	if ((res = ast_mkdir(dir, 01777))) {
-		ast_log(LOG_WARNING, "ast_mkdir '%s' failed: %s\n", dir, strerror(res));
+		ast_log(AST_LOG_WARNING, "ast_mkdir '%s' failed: %s\n", dir, strerror(res));
 		return snprintf(dest, len, "%s/msg%04d", dir, num);
 	}
 	return snprintf(dest, len, "%s/msg%04d", dir, num);
@@ -1137,7 +1141,7 @@
 
 	messageNum = vms->msgArray[msgnum];
 	if (messageNum == 0) {
-		ast_log(LOG_WARNING, "msgnum %d, mailbox message %lu is zero.\n", msgnum, messageNum);
+		ast_log(AST_LOG_WARNING, "msgnum %d, mailbox message %lu is zero.\n", msgnum, messageNum);
 		return;
 	}
 	ast_debug(3, "deleting msgnum %d, which is mailbox message %lu\n", msgnum, messageNum);
@@ -1167,7 +1171,7 @@
 
 	make_dir(dest, len, context, ext, folder);
 	if ((res = ast_mkdir(dest, mode))) {
-		ast_log(LOG_WARNING, "ast_mkdir '%s' failed: %s\n", dest, strerror(res));
+		ast_log(AST_LOG_WARNING, "ast_mkdir '%s' failed: %s\n", dest, strerror(res));
 		return -1;
 	}
 	return 0;
@@ -1203,12 +1207,12 @@
 
 	res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
 	if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-		ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
+		ast_log(AST_LOG_WARNING, "SQL Alloc Handle failed!\n");
 		return NULL;
 	}
 	res = SQLPrepare(stmt, (unsigned char *)gps->sql, SQL_NTS);
 	if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-		ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", gps->sql);
+		ast_log(AST_LOG_WARNING, "SQL Prepare failed![%s]\n", gps->sql);
 		SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 		return NULL;
 	}
@@ -1279,7 +1283,7 @@
 		snprintf(full_fn, sizeof(full_fn), "%s.txt", fn);
 		
 		if (!(f = fopen(full_fn, "w+"))) {
-			ast_log(LOG_WARNING, "Failed to open/create '%s'\n", full_fn);
+			ast_log(AST_LOG_WARNING, "Failed to open/create '%s'\n", full_fn);
 			goto yuck;
 		}
 		
@@ -1287,7 +1291,7 @@
 		snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE dir=? AND msgnum=?", odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
@@ -1297,21 +1301,21 @@
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		} else if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, VOICEMAIL_FILE_MODE);
 		if (fd < 0) {
-			ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
+			ast_log(AST_LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLNumResultCols(stmt, &colcount);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {	
-			ast_log(LOG_WARNING, "SQL Column Count error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Column Count error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
@@ -1324,7 +1328,7 @@
 			res = SQLDescribeCol(stmt, x + 1, (unsigned char *)coltitle, sizeof(coltitle), &collen, 
 						&datatype, &colsize, &decimaldigits, &nullable);
 			if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-				ast_log(LOG_WARNING, "SQL Describe Column error!\n[%s]\n\n", sql);
+				ast_log(AST_LOG_WARNING, "SQL Describe Column error!\n[%s]\n\n", sql);
 				SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 				ast_odbc_release_obj(obj);
 				goto yuck;
@@ -1344,7 +1348,7 @@
 					/* Read out in small chunks */
 					for (offset = 0; offset < colsize2; offset += CHUNKSIZE) {
 						if ((fdm = mmap(NULL, CHUNKSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == MAP_FAILED) {
-							ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
+							ast_log(AST_LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
 							SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 							ast_odbc_release_obj(obj);
 							goto yuck;
@@ -1352,7 +1356,7 @@
 							res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, CHUNKSIZE, NULL);
 							munmap(fdm, CHUNKSIZE);
 							if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-								ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+								ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 								unlink(full_fn);
 								SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 								ast_odbc_release_obj(obj);
@@ -1365,7 +1369,7 @@
 			} else {
 				res = SQLGetData(stmt, x + 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 				if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-					ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+					ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 					SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 					ast_odbc_release_obj(obj);
 					goto yuck;
@@ -1377,7 +1381,7 @@
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
 	if (f)
 		fclose(f);
@@ -1443,30 +1447,30 @@
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=?", odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (sscanf(rowdata, "%d", &x) != 1)
-			ast_log(LOG_WARNING, "Failed to read message count!\n");
+			ast_log(AST_LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
 	return x - 1;
 }
@@ -1498,30 +1502,30 @@
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=? AND msgnum=?", odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (sscanf(rowdata, "%d", &x) != 1)
-			ast_log(LOG_WARNING, "Failed to read message count!\n");
+			ast_log(AST_LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
 	return x;
 }
@@ -1568,12 +1572,12 @@
 		snprintf(sql, sizeof(sql), "DELETE FROM %s WHERE dir=? AND msgnum=?", odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt)
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 		else
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 	return;	
 }
 
@@ -1606,12 +1610,12 @@
 		snprintf(sql, sizeof(sql), "INSERT INTO %s (dir, msgnum, context, macrocontext, callerid, origtime, duration, recording, mailboxuser, mailboxcontext) SELECT ?,?,context,macrocontext,callerid,origtime,duration,recording,?,? FROM %s WHERE dir=? AND msgnum=?", odbc_table, odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt)
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);
 		else
 			SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 	return;	
 }
 
@@ -1672,7 +1676,7 @@
 		snprintf(full_fn, sizeof(full_fn), "%s.%s", fn, fmt);
 		fd = open(full_fn, O_RDWR);
 		if (fd < 0) {
-			ast_log(LOG_WARNING, "Open of sound file '%s' failed: %s\n", full_fn, strerror(errno));
+			ast_log(AST_LOG_WARNING, "Open of sound file '%s' failed: %s\n", full_fn, strerror(errno));
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
@@ -1695,13 +1699,13 @@
 		printf("Length is %zd\n", fdlen);
 		fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 		if (fdm == MAP_FAILED) {
-			ast_log(LOG_WARNING, "Memory map failed!\n");
+			ast_log(AST_LOG_WARNING, "Memory map failed!\n");
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		} 
 		res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Alloc Handle failed!\n");
+			ast_log(AST_LOG_WARNING, "SQL Alloc Handle failed!\n");
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
@@ -1711,7 +1715,7 @@
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext) VALUES (?,?,?,?,?,?,?,?,?,?)", odbc_table);
 		res = SQLPrepare(stmt, (unsigned char *)sql, SQL_NTS);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
@@ -1731,7 +1735,7 @@
 			SQLBindParameter(stmt, 11, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(category), 0, (void *)category, 0, NULL);
 		res = ast_odbc_smart_execute(obj, stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
@@ -1739,7 +1743,7 @@
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
 	if (cfg)
 		ast_config_destroy(cfg);
@@ -1781,12 +1785,12 @@
 		snprintf(sql, sizeof(sql), "UPDATE %s SET dir=?, msgnum=?, mailboxuser=?, mailboxcontext=? WHERE dir=? AND msgnum=?", odbc_table);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt)
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 		else
 			SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 		ast_odbc_release_obj(obj);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 	return;	
 }
 
@@ -1909,18 +1913,18 @@
 	if (link(infile, outfile)) {
 #endif
 		if ((ifd = open(infile, O_RDONLY)) < 0) {
-			ast_log(LOG_WARNING, "Unable to open %s in read-only mode\n", infile);
+			ast_log(AST_LOG_WARNING, "Unable to open %s in read-only mode\n", infile);
 			return -1;
 		}
 		if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, VOICEMAIL_FILE_MODE)) < 0) {
-			ast_log(LOG_WARNING, "Unable to open %s in write-only mode\n", outfile);
+			ast_log(AST_LOG_WARNING, "Unable to open %s in write-only mode\n", outfile);
 			close(ifd);
 			return -1;
 		}
 		do {
 			len = read(ifd, buf, sizeof(buf));
 			if (len < 0) {
-				ast_log(LOG_WARNING, "Read failed on %s: %s\n", infile, strerror(errno));
+				ast_log(AST_LOG_WARNING, "Read failed on %s: %s\n", infile, strerror(errno));
 				close(ifd);
 				close(ofd);
 				unlink(outfile);
@@ -1928,7 +1932,7 @@
 			if (len) {
 				res = write(ofd, buf, len);
 				if (errno == ENOMEM || errno == ENOSPC || res != len) {
-					ast_log(LOG_WARNING, "Write failed on %s (%d of %d): %s\n", outfile, res, len, strerror(errno));
+					ast_log(AST_LOG_WARNING, "Write failed on %s (%d of %d): %s\n", outfile, res, len, strerror(errno));
 					close(ifd);
 					close(ofd);
 					unlink(outfile);
@@ -2103,7 +2107,7 @@
 	bio.iocp = BASEMAXINLINE;
 
 	if (!(fi = fopen(filename, "rb"))) {
-		ast_log(LOG_WARNING, "Failed to open file: %s: %s\n", filename, strerror(errno));
+		ast_log(AST_LOG_WARNING, "Failed to open file: %s: %s\n", filename, strerror(errno));
 		return -1;
 	}
 
@@ -2300,7 +2304,7 @@
 			fprintf(p, "From: %s <%s>" ENDL, quote(passdata, passdata2, len_passdata), who);
 			ast_channel_free(ast);
 		} else
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else
 		fprintf(p, "From: Asterisk PBX <%s>" ENDL, who);
 	len_passdata = strlen(vmu->fullname) * 2 + 3;
@@ -2318,7 +2322,7 @@
 			fprintf(p, "Subject: %s" ENDL, passdata);
 			ast_channel_free(ast);
 		} else
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else if (ast_test_flag((&globalflags), VM_PBXSKIP))
 		fprintf(p, "Subject: New message %d in mailbox %s" ENDL, msgnum + 1, mailbox);
 	else
@@ -2368,7 +2372,7 @@
 			fprintf(p, "%s" ENDL, passdata);
 			ast_channel_free(ast);
 		} else
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else if (msgnum > -1) {
 		fprintf(p, "Dear %s:" ENDL ENDL "\tJust wanted to let you know you were just left a %s long message (number %d)" ENDL
 
@@ -2428,7 +2432,7 @@
 	char tmp2[256];
 
 	if (vmu && ast_strlen_zero(vmu->email)) {
-		ast_log(LOG_WARNING, "E-mail address missing for mailbox [%s].  E-mail will not be sent.\n", vmu->mailbox);
+		ast_log(AST_LOG_WARNING, "E-mail address missing for mailbox [%s].  E-mail will not be sent.\n", vmu->mailbox);
 		return(0);
 	}
 	if (!strcmp(format, "wav49"))
@@ -2437,7 +2441,7 @@
 	/* 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 launch '%s' (can't create temporary file)\n", mailcmd);
+		ast_log(AST_LOG_WARNING, "Unable to launch '%s' (can't create temporary file)\n", mailcmd);
 		return -1;
 	} else {
 		make_email_file(p, srcemail, vmu, msgnum, context, mailbox, cidnum, cidname, attach, format, duration, attach_user_voicemail, chan, category, 0);
@@ -2461,7 +2465,7 @@
 	FILE *p;
 
 	if ((p = vm_mkftemp(tmp)) == NULL) {
-		ast_log(LOG_WARNING, "Unable to launch '%s' (can't create temporary file)\n", mailcmd);
+		ast_log(AST_LOG_WARNING, "Unable to launch '%s' (can't create temporary file)\n", mailcmd);
 		return -1;
 	}
 	gethostname(host, sizeof(host) - 1);
@@ -2485,7 +2489,7 @@
 			fprintf(p, "From: %s <%s>\n", passdata, who);
 			ast_channel_free(ast);
 		} else 
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else
 		fprintf(p, "From: Asterisk PBX <%s>\n", who);
 	fprintf(p, "To: %s\n", pager);
@@ -2501,7 +2505,7 @@
 			fprintf(p, "Subject: %s\n\n", passdata);
 			ast_channel_free(ast);
 		} else
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else
 		fprintf(p, "Subject: New VM\n\n");
 
@@ -2518,7 +2522,7 @@
 			fprintf(p, "%s\n", passdata);
 			ast_channel_free(ast);
 		} else
-			ast_log(LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
+			ast_log(AST_LOG_WARNING, "Cannot allocate the channel for variables substitution\n");
 	} else {
 		fprintf(p, "New %s long msg in box %s\n"
 				"from %s, on %s", dur, mailbox, (cidname ? cidname : (cidnum ? cidnum : "unknown")), date);
@@ -2583,7 +2587,7 @@
 	snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, vmu->context, ext);
 
 	if ((res = create_dirpath(dest, sizeof(dest), vmu->context, ext, ""))) {
-		ast_log(LOG_WARNING, "Failed to make directory(%s)\n", fn);
+		ast_log(AST_LOG_WARNING, "Failed to make directory(%s)\n", fn);
 		return -1;
 	}
 
@@ -2726,20 +2730,20 @@
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, tmp, "INBOX");
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
@@ -2750,20 +2754,20 @@
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, tmp, "Old");
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			ast_odbc_release_obj(obj);
 			goto yuck;
@@ -2773,7 +2777,7 @@
 		*oldmsgs = atoi(rowdata);
 		x = 0;
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 		
 yuck:	
 	return x;
@@ -2808,25 +2812,25 @@
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, mailbox, folder);
 		stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);
 		if (!stmt) {
-			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Fetch error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			goto yuck;
 		}
 		res = SQLGetData(stmt, 1, SQL_CHAR, rowdata, sizeof(rowdata), NULL);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
-			ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
+			ast_log(AST_LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 			goto yuck;
 		}
 		nummsgs = atoi(rowdata);
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
 	} else
-		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
+		ast_log(AST_LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 
 yuck:
 	if (obj)
@@ -2901,7 +2905,7 @@
 	/* Make a temporary file instead of piping directly to sendmail, in case the mail
 	   command hangs. */
 	if (!(p = vm_mkftemp(tmp))) {
-		ast_log(LOG_WARNING, "Unable to store '%s' (can't create temporary file)\n", fn);
+		ast_log(AST_LOG_WARNING, "Unable to store '%s' (can't create temporary file)\n", fn);
 		if (tempcopy)
 			*(vmu->email) = '\0';
 		return -1;
@@ -2917,7 +2921,7 @@
 	len = ftell(p);
 	rewind(p);
 	if (!(buf = ast_malloc(len + 1))) {
-		ast_log(LOG_ERROR, "Can't allocate %ld bytes to read message\n", len + 1);
+		ast_log(AST_LOG_ERROR, "Can't allocate %ld bytes to read message\n", len + 1);
 		fclose(p);
 		if (tempcopy)
 			*(vmu->email) = '\0';
@@ -2929,7 +2933,7 @@
 	init_mailstream(vms, NEW_FOLDER);
 	imap_mailbox_name(mailbox, sizeof(mailbox), vms, NEW_FOLDER, 1);
 	if (!mail_append(vms->mailstream, mailbox, &str))
-		ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
+		ast_log(AST_LOG_ERROR, "Error while sending the message to %s\n", mailbox);
 	fclose(p);
 	unlink(tmp);
 	ast_free(buf);
@@ -2965,22 +2969,22 @@
 		return 0;
 
 	/* We have to get the user before we can open the stream! */
-	/* ast_log(LOG_DEBUG, "Before find_user, context is %s and mailbox is %s\n", context, mailbox); */
+	/* ast_log(AST_LOG_DEBUG, "Before find_user, context is %s and mailbox is %s\n", context, mailbox); */
 	vmu = find_user(&vmus, context, mailbox);
 	if (!vmu) {
-		ast_log(LOG_ERROR, "Couldn't find mailbox %s in context %s\n", mailbox, context);
+		ast_log(AST_LOG_ERROR, "Couldn't find mailbox %s in context %s\n", mailbox, context);
 		return -1;
 	} else {
 		/* No IMAP account available */
 		if (vmu->imapuser[0] == '\0') {
-			ast_log(LOG_WARNING, "IMAP user not set for mailbox %s\n", vmu->mailbox);
+			ast_log(AST_LOG_WARNING, "IMAP user not set for mailbox %s\n", vmu->mailbox);
 			return -1;
 		}
 	}
 	
 	/* No IMAP account available */
 	if (vmu->imapuser[0] == '\0') {
-		ast_log(LOG_WARNING, "IMAP user not set for mailbox %s\n", vmu->mailbox);
+		ast_log(AST_LOG_WARNING, "IMAP user not set for mailbox %s\n", vmu->mailbox);
 		free_user(vmu);
 		return -1;
 	}
@@ -3023,7 +3027,7 @@
 	}
 	ret = init_mailstream(vms_p, fold);
 	if (!vms_p->mailstream) {
-		ast_log(LOG_ERROR, "Houston we have a problem - IMAP mailstream is NULL\n");
+		ast_log(AST_LOG_ERROR, "Houston we have a problem - IMAP mailstream is NULL\n");
 		return -1;
 	}
 	if (ret == 0) {
@@ -3177,17 +3181,17 @@
 	struct vm_state *sendvms = NULL, *destvms = NULL;
 	char messagestring[10]; /* I guess this could be a problem if someone has more than 999,999,999 messages... */
 	if (!(sendvms = get_vm_state_by_imapuser(vmu->imapuser, 0))) {
-		ast_log(LOG_ERROR, "Couldn't get vm_state for originator's mailbox!!\n");
+		ast_log(AST_LOG_ERROR, "Couldn't get vm_state for originator's mailbox!!\n");
 		return -1;
 	}
 	if (!(destvms = get_vm_state_by_imapuser(recip->imapuser, 0))) {
-		ast_log(LOG_ERROR, "Couldn't get vm_state for destination mailbox!\n");
+		ast_log(AST_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))
 		return 0;
-	ast_log(LOG_WARNING, "Unable to copy message from mailbox %s to mailbox %s\n", vmu->mailbox, recip->mailbox);
+	ast_log(AST_LOG_WARNING, "Unable to copy message from mailbox %s to mailbox %s\n", vmu->mailbox, recip->mailbox);
 	return -1;
 }
 
@@ -3214,7 +3218,7 @@
 	const char *frombox = mbox(imbox);
 	int recipmsgnum;
 
-	ast_log(LOG_NOTICE, "Copying message from %s@%s to %s@%s\n", vmu->mailbox, vmu->context, recip->mailbox, recip->context);
+	ast_log(AST_LOG_NOTICE, "Copying message from %s@%s to %s@%s\n", vmu->mailbox, vmu->context, recip->mailbox, recip->context);
 
 	create_dirpath(todir, sizeof(todir), recip->context, recip->mailbox, "INBOX");
 	
@@ -3234,7 +3238,7 @@
 		make_file(topath, sizeof(topath), todir, recipmsgnum);
 		COPY(fromdir, msgnum, todir, recipmsgnum, recip->mailbox, recip->context, frompath, topath);
 	} else {
-		ast_log(LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context);
+		ast_log(AST_LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context);
 	}
 	ast_unlock_path(todir);
 	notify_new_message(chan, recip, NULL, recipmsgnum, duration, fmt, S_OR(chan->cid.cid_num, NULL), S_OR(chan->cid.cid_name, NULL));
@@ -3383,12 +3387,12 @@
 			ast_smdi_mwi_unset(smdi_iface, extension);
 
 		if ((mwi_msg = ast_smdi_mwi_message_wait_station(smdi_iface, SMDI_MWI_WAIT_TIMEOUT, extension))) {
-			ast_log(LOG_ERROR, "Error executing SMDI MWI change for %s\n", extension);
+			ast_log(AST_LOG_ERROR, "Error executing SMDI MWI change for %s\n", extension);
 			if (!strncmp(mwi_msg->cause, "INV", 3))
-				ast_log(LOG_ERROR, "Invalid MWI extension: %s\n", mwi_msg->fwd_st);
+				ast_log(AST_LOG_ERROR, "Invalid MWI extension: %s\n", mwi_msg->fwd_st);
 			else if (!strncmp(mwi_msg->cause, "BLK", 3))
-				ast_log(LOG_WARNING, "MWI light was already on or off for %s\n", mwi_msg->fwd_st);
-			ast_log(LOG_WARNING, "The switch reported '%s'\n", mwi_msg->cause);
+				ast_log(AST_LOG_WARNING, "MWI light was already on or off for %s\n", mwi_msg->fwd_st);
+			ast_log(AST_LOG_WARNING, "The switch reported '%s'\n", mwi_msg->cause);
 			ASTOBJ_UNREF(mwi_msg, ast_smdi_mwi_message_destroy);
 		} else {
 			ast_debug(1, "Successfully executed SMDI MWI change for %s\n", extension);
@@ -3397,7 +3401,7 @@
 
 	if (!ast_strlen_zero(externnotify)) {
 		if (inboxcount(ext_context, &newvoicemails, &oldvoicemails)) {
-			ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension);
+			ast_log(AST_LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension);
 		} else {
 			snprintf(arguments, sizeof(arguments), "%s %s %s %d&", externnotify, context, extension, newvoicemails);
 			ast_debug(1, "Executing %s\n", arguments);
@@ -3484,7 +3488,7 @@
 
 	ast_debug(3, "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);
+		ast_log(AST_LOG_WARNING, "No entry in voicemail config file for '%s'\n", ext);
 		pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
 		return res;
 	}
@@ -3510,7 +3514,7 @@
 	*/
 	snprintf(tempfile, sizeof(tempfile), "%s%s/%s/temp", VM_SPOOL_DIR, vmu->context, ext);
 	if ((res = create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, ext, "tmp"))) {
-		ast_log(LOG_WARNING, "Failed to make directory (%s)\n", tempfile);
+		ast_log(AST_LOG_WARNING, "Failed to make directory (%s)\n", tempfile);
 		return -1;
 	}
 
@@ -3646,7 +3650,7 @@
 		/* must open stream for this user to get info! */
 		res = inboxcount(ext_context, &newmsgs, &oldmsgs);
 		if (res < 0) {
-			ast_log(LOG_NOTICE, "Can not leave voicemail, unable to count messages\n");
+			ast_log(AST_LOG_NOTICE, "Can not leave voicemail, unable to count messages\n");
 			return -1;
 		}
 		if (!(vms = get_vm_state_by_mailbox(ext, 0))) {
@@ -3655,7 +3659,7 @@
 		 * rarely be used.
 		 */
 			if (!(vms = ast_calloc(1, sizeof(*vms)))) {
-				ast_log(LOG_ERROR, "Couldn't allocate necessary space\n");
+				ast_log(AST_LOG_ERROR, "Couldn't allocate necessary space\n");
 				return -1;
 			}
 			ast_copy_string(vms->imapuser, vmu->imapuser, sizeof(vms->imapuser));
@@ -3687,7 +3691,7 @@
 		
 		/* Check if we have exceeded maxmsg */
 		if (msgnum >= vmu->maxmsg) {
-			ast_log(LOG_WARNING, "Unable to leave message since we will exceed the maximum number of messages allowed (%u > %u)\n", msgnum, vmu->maxmsg);
+			ast_log(AST_LOG_WARNING, "Unable to leave message since we will exceed the maximum number of messages allowed (%u > %u)\n", msgnum, vmu->maxmsg);
 			ast_play_and_wait(chan, "vm-mailboxfull");
 			return -1;
 		}
@@ -3697,7 +3701,7 @@
 			res = ast_streamfile(chan, "vm-mailboxfull", chan->language);
 			if (!res)
 				res = ast_waitstream(chan, "");
-			ast_log(LOG_WARNING, "No more messages possible\n");
+			ast_log(AST_LOG_WARNING, "No more messages possible\n");
 			pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
 			goto leave_vm_out;
 		}
@@ -3710,7 +3714,7 @@
 			res = ast_streamfile(chan, "vm-mailboxfull", chan->language);
 			if (!res)
 				res = ast_waitstream(chan, "");
-			ast_log(LOG_ERROR, "Unable to create message file: %s\n", strerror(errno));
+			ast_log(AST_LOG_ERROR, "Unable to create message file: %s\n", strerror(errno));
 			pbx_builtin_setvar_helper(chan, "VMSTATUS", "FAILED");
 			goto leave_vm_out;
 		}
@@ -3758,7 +3762,7 @@
 				date, (long)time(NULL),
 				category ? category : ""); 
 		} else
-			ast_log(LOG_WARNING, "Error opening text file for output\n");

[... 967 lines stripped ...]



More information about the asterisk-commits mailing list