[asterisk-commits] murf: branch murf/bug7433 r47637 - in /team/murf/bug7433: ./ apps/ channels/ ...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 14 17:07:37 MST 2006


Author: murf
Date: Tue Nov 14 18:07:37 2006
New Revision: 47637

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47637
Log:
Merged revisions 47613,47617,47621,47625,47628,47632 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47613 | oej | 2006-11-14 09:22:35 -0700 (Tue, 14 Nov 2006) | 2 lines

Update documentation to fit the implementation...

................
r47617 | file | 2006-11-14 09:45:57 -0700 (Tue, 14 Nov 2006) | 2 lines

Use LOG_DEBUG to print out the indication that app_amd is using default settings instead of using LOG_NOTICE. This stops needless logging of this information under normal circumstances. (issue #8361 reported by Seb7)

................
r47621 | tilghman | 2006-11-14 11:54:40 -0700 (Tue, 14 Nov 2006) | 3 lines

Conversion of res_odbc API to include ast_ prefix did not completely transition app_voicemail
when ODBC_STORAGE is used (reported on IRC by caio1982, not in bugtracker)

................
r47625 | file | 2006-11-14 14:30:44 -0700 (Tue, 14 Nov 2006) | 2 lines

Small documentation clarification for URIENCODE. (issue #8294 reported by salaud)

................
r47628 | file | 2006-11-14 15:05:03 -0700 (Tue, 14 Nov 2006) | 2 lines

Only keep the video RTP structure around if 1. Video support is enabled and 2. A video codec is enabled on the dialog

................
r47632 | file | 2006-11-14 15:17:16 -0700 (Tue, 14 Nov 2006) | 10 lines

Merged revisions 47631 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r47631 | file | 2006-11-14 17:15:10 -0500 (Tue, 14 Nov 2006) | 2 lines

Update copyright information in the ADSI logo blob.

........

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

Modified:
    team/murf/bug7433/   (props changed)
    team/murf/bug7433/apps/app_amd.c
    team/murf/bug7433/apps/app_voicemail.c
    team/murf/bug7433/channels/chan_sip.c
    team/murf/bug7433/funcs/func_uri.c

Propchange: team/murf/bug7433/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/murf/bug7433/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Nov 14 18:07:37 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-47612
+/branches/1.4:1-47483

Modified: team/murf/bug7433/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/apps/app_amd.c?view=diff&rev=47637&r1=47636&r2=47637
==============================================================================
--- team/murf/bug7433/apps/app_amd.c (original)
+++ team/murf/bug7433/apps/app_amd.c Tue Nov 14 18:07:37 2006
@@ -151,8 +151,8 @@
 			maximumNumberOfWords = atoi(args.argMaximumNumberOfWords);
 		if (!ast_strlen_zero(args.argSilenceThreshold))
 			silenceThreshold = atoi(args.argSilenceThreshold);
-	} else
-		ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
+	} else if (option_debug)
+		ast_log(LOG_DEBUG, "AMD using the default parameters.\n");
 
 	/* Now we're ready to roll! */
 	if (option_verbose > 2)

Modified: team/murf/bug7433/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/apps/app_voicemail.c?view=diff&rev=47637&r1=47636&r2=47637
==============================================================================
--- team/murf/bug7433/apps/app_voicemail.c (original)
+++ team/murf/bug7433/apps/app_voicemail.c Tue Nov 14 18:07:37 2006
@@ -1001,6 +1001,7 @@
 	SQLSMALLINT decimaldigits;
 	SQLSMALLINT nullable;
 	SQLULEN colsize;
+	SQLLEN colsize2;
 	FILE *f=NULL;
 	char rowdata[80];
 	char fn[256];
@@ -1008,7 +1009,7 @@
 	char msgnums[80];
 	
 	struct odbc_obj *obj;
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		ast_copy_string(fmt, vmfmts, sizeof(fmt));
 		c = strchr(fmt, '|');
@@ -1027,50 +1028,50 @@
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT * FROM %s WHERE dir=? AND msgnum=?",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dir), 0, (void *)dir, 0, NULL);
 		SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		res = SQLFetch(stmt);
 		if (res == SQL_NO_DATA) {
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		fd = open(full_fn, O_RDWR | O_CREAT | O_TRUNC, 0770);
 		if (fd < 0) {
 			ast_log(LOG_WARNING, "Failed to write '%s': %s\n", full_fn, strerror(errno));
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (f) 
@@ -1078,17 +1079,17 @@
 		for (x=0;x<colcount;x++) {
 			rowdata[0] = '\0';
 			collen = sizeof(coltitle);
-			res = SQLDescribeCol(stmt, x + 1, coltitle, sizeof(coltitle), &collen, 
+			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);
 				SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-				odbc_release_obj(obj);
+				ast_odbc_release_obj(obj);
 				goto yuck;
 			}
 			if (!strcasecmp(coltitle, "recording")) {
-				res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize);
-				fdlen = colsize;
+				res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize2);
+				fdlen = colsize2;
 				if (fd > -1) {
 					char tmp[1]="";
 					lseek(fd, fdlen - 1, SEEK_SET);
@@ -1102,11 +1103,11 @@
 				}
 				if (fdm) {
 					memset(fdm, 0, fdlen);
-					res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, fdlen, &colsize);
+					res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, fdlen, &colsize2);
 					if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 						ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 						SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-						odbc_release_obj(obj);
+						ast_odbc_release_obj(obj);
 						goto yuck;
 					}
 				}
@@ -1115,7 +1116,7 @@
 				if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 					ast_log(LOG_WARNING, "SQL Get Data error!\n[%s]\n\n", sql);
 					SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-					odbc_release_obj(obj);
+					ast_odbc_release_obj(obj);
 					goto yuck;
 				}
 				if (strcasecmp(coltitle, "msgnum") && strcasecmp(coltitle, "dir") && f)
@@ -1123,7 +1124,7 @@
 			}
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
@@ -1162,48 +1163,48 @@
 	char rowdata[20];
 	
 	struct odbc_obj *obj;
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=?",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dir), 0, (void *)dir, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (sscanf(rowdata, "%d", &x) != 1)
 			ast_log(LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
@@ -1220,50 +1221,50 @@
 	char msgnums[20];
 	
 	struct odbc_obj *obj;
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		snprintf(msgnums, sizeof(msgnums), "%d", msgnum);
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir=? AND msgnum=?",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dir), 0, (void *)dir, 0, NULL);
 		SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (sscanf(rowdata, "%d", &x) != 1)
 			ast_log(LOG_WARNING, "Failed to read message count!\n");
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
@@ -1283,34 +1284,34 @@
 	char msgnums[20];
 	
 	struct odbc_obj *obj;
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		snprintf(msgnums, sizeof(msgnums), "%d", smsg);
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "DELETE FROM %s WHERE dir=? AND msgnum=?",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
 		SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:
@@ -1327,22 +1328,22 @@
 	struct odbc_obj *obj;
 
 	delete_file(ddir, dmsg);
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		snprintf(msgnums, sizeof(msgnums), "%d", smsg);
 		snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg);
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		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); 
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(ddir), 0, (void *)ddir, 0, NULL);
@@ -1351,15 +1352,15 @@
 		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dmailboxcontext), 0, (void *)dmailboxcontext, 0, NULL);
 		SQLBindParameter(stmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
 		SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:
@@ -1381,13 +1382,13 @@
 	char full_fn[256];
 	char fmt[80]="";
 	char *c;
-	char *context="", *macrocontext="", *callerid="", *origtime="", *duration="";
-	char *category = "";
+	const char *context="", *macrocontext="", *callerid="", *origtime="", *duration="";
+	const char *category = "";
 	struct ast_config *cfg=NULL;
 	struct odbc_obj *obj;
 
 	delete_file(dir, msgnum);
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		ast_copy_string(fmt, vmfmts, sizeof(fmt));
 		c = strchr(fmt, '|');
@@ -1406,7 +1407,7 @@
 		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));
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (cfg) {
@@ -1429,24 +1430,24 @@
 		fdm = mmap(NULL, fdlen, PROT_READ | PROT_WRITE, MAP_SHARED,fd, 0);
 		if (!fdm) {
 			ast_log(LOG_WARNING, "Memory map failed!\n");
-			odbc_release_obj(obj);
+			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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		if (!ast_strlen_zero(category)) 
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,category) VALUES (?,?,?,?,?,?,?,?,?,?,?)",odbc_table); 
 		else
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext) VALUES (?,?,?,?,?,?,?,?,?,?)",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		len = fdlen; /* SQL_LEN_DATA_AT_EXEC(fdlen); */
@@ -1462,15 +1463,15 @@
 		SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxcontext), 0, (void *)mailboxcontext, 0, NULL);
 		if (!ast_strlen_zero(category))
 			SQLBindParameter(stmt, 11, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(category), 0, (void *)category, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:	
@@ -1493,22 +1494,22 @@
 	struct odbc_obj *obj;
 
 	delete_file(ddir, dmsg);
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		snprintf(msgnums, sizeof(msgnums), "%d", smsg);
 		snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg);
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "UPDATE %s SET dir=?, msgnum=?, mailboxuser=?, mailboxcontext=? WHERE dir=? AND msgnum=?",odbc_table);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(ddir), 0, (void *)ddir, 0, NULL);
@@ -1517,15 +1518,15 @@
 		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxcontext), 0, (void *)mailboxcontext, 0, NULL);
 		SQLBindParameter(stmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
 		SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	} else
 		ast_log(LOG_WARNING, "Failed to obtain database object for '%s'!\n", odbc_database);
 yuck:
@@ -2202,41 +2203,41 @@
 	} else
 		context = "default";
 	
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, tmp, "INBOX");
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		*newmsgs = atoi(rowdata);
@@ -2245,40 +2246,40 @@
 		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");
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, tmp, "Old");
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-			odbc_release_obj(obj);
+			ast_odbc_release_obj(obj);
 			goto yuck;
 		}
 		SQLFreeHandle (SQL_HANDLE_STMT, stmt);
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 		*oldmsgs = atoi(rowdata);
 		x = 0;
 	} else
@@ -2302,7 +2303,7 @@
 	if (ast_strlen_zero(mailbox))
 		return 0;
 
-	obj = odbc_request_obj(odbc_database, 0);
+	obj = ast_odbc_request_obj(odbc_database, 0);
 	if (obj) {
 		res = SQLAllocHandle(SQL_HANDLE_STMT, obj->con, &stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
@@ -2310,13 +2311,13 @@
 			goto yuck;
 		}
 		snprintf(sql, sizeof(sql), "SELECT COUNT(*) FROM %s WHERE dir = '%s%s/%s/%s'", odbc_table, VM_SPOOL_DIR, context, mailbox, folder);
-		res = SQLPrepare(stmt, sql, SQL_NTS);
+		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);
 			SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 			goto yuck;
 		}
-		res = odbc_smart_execute(obj, stmt);
+		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);
 			SQLFreeHandle (SQL_HANDLE_STMT, stmt);
@@ -2341,7 +2342,7 @@
 
 yuck:
 	if (obj)
-		odbc_release_obj(obj);
+		ast_odbc_release_obj(obj);
 	return nummsgs;
 }
 
@@ -3230,7 +3231,7 @@
 {
 	int bytes = 0;
 	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "Comedian Mail", "");
-	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002 LSS, Inc.", "");
+	bytes += ast_adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002-2006 Digium, Inc.", "");
 	return bytes;
 }
 

Modified: team/murf/bug7433/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/channels/chan_sip.c?view=diff&rev=47637&r1=47636&r2=47637
==============================================================================
--- team/murf/bug7433/channels/chan_sip.c (original)
+++ team/murf/bug7433/channels/chan_sip.c Tue Nov 14 18:07:37 2006
@@ -2561,7 +2561,7 @@
 	ast_copy_flags(&dialog->flags[0], &peer->flags[0], SIP_FLAGS_TO_COPY);
 	ast_copy_flags(&dialog->flags[1], &peer->flags[1], SIP_PAGE2_FLAGS_TO_COPY);
 	dialog->capability = peer->capability;
-	if (!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) && dialog->vrtp) {
+	if ((!ast_test_flag(&dialog->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(dialog->capability & AST_FORMAT_VIDEO_MASK)) && dialog->vrtp) {
 		ast_rtp_destroy(dialog->vrtp);
 		dialog->vrtp = NULL;
 	}
@@ -8948,7 +8948,7 @@
 				p->t38.jointcapability &= p->t38.peercapability;
 			p->maxcallbitrate = user->maxcallbitrate;
 			/* If we do not support video, remove video from call structure */
-			if (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) && p->vrtp) {
+			if ((!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(p->capability & AST_FORMAT_VIDEO_MASK)) && p->vrtp) {
 				ast_rtp_destroy(p->vrtp);
 				p->vrtp = NULL;
 			}
@@ -9068,7 +9068,7 @@
 				if (p->peercapability)
 					p->jointcapability &= p->peercapability;
 				p->maxcallbitrate = peer->maxcallbitrate;
-				if (!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) && p->vrtp) {
+				if ((!ast_test_flag(&p->flags[1], SIP_PAGE2_VIDEOSUPPORT) || !(p->capability & AST_FORMAT_VIDEO_MASK)) && p->vrtp) {
 					ast_rtp_destroy(p->vrtp);
 					p->vrtp = NULL;
 				}
@@ -14905,6 +14905,9 @@
 		- registered, no call			AST_DEVICE_NOT_INUSE
 		- registered, active calls		AST_DEVICE_INUSE
 		- registered, call limit reached	AST_DEVICE_BUSY
+		- registered, onhold			AST_DEVICE_ONHOLD
+		- registered, ringing			AST_DEVICE_RINGING
+
 	For peers without call limit:
 		- not registered			AST_DEVICE_UNAVAILABLE
 		- registered				AST_DEVICE_NOT_INUSE

Modified: team/murf/bug7433/funcs/func_uri.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug7433/funcs/func_uri.c?view=diff&rev=47637&r1=47636&r2=47637
==============================================================================
--- team/murf/bug7433/funcs/func_uri.c (original)
+++ team/murf/bug7433/funcs/func_uri.c Tue Nov 14 18:07:37 2006
@@ -74,14 +74,14 @@
 
 static struct ast_custom_function urldecode_function = {
 	.name = "URIDECODE",
-	.synopsis = "Decodes an URI-encoded string.",
+	.synopsis = "Decodes a URI-encoded string according to RFC 2396.",
 	.syntax = "URIDECODE(<data>)",
 	.read = uridecode,
 };
 
 static struct ast_custom_function urlencode_function = {
 	.name = "URIENCODE",
-	.synopsis = "Encodes a string to URI-safe encoding.",
+	.synopsis = "Encodes a string to URI-safe encoding according to RFC 2396.",
 	.syntax = "URIENCODE(<data>)",
 	.read = uriencode,
 };



More information about the asterisk-commits mailing list