[asterisk-commits] murf: branch murf/bug8574-1.2 r51210 - in /team/murf/bug8574-1.2: ./ apps/ ch...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 17 17:10:44 MST 2007


Author: murf
Date: Wed Jan 17 18:10:43 2007
New Revision: 51210

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51210
Log:
Merged revisions 51085,51145,51158,51161,51194,51197 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r51085 | file | 2007-01-15 22:53:31 -0700 (Mon, 15 Jan 2007) | 2 lines

Add none as a valid callgroup/pickupgroup option. I consider it a bug that it would inherit it all the way down and not have any way to reset it to nothing - so that's why it is in 1.2. (issue #8296 reported by gkloepfer)

........
r51145 | file | 2007-01-16 10:36:50 -0700 (Tue, 16 Jan 2007) | 2 lines

Return previous behavior. ParkedCalls will be able to do DTMF based transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex)

........
r51158 | tilghman | 2007-01-16 14:26:06 -0700 (Tue, 16 Jan 2007) | 2 lines

Postgres driver doesn't like a NULL pointer when retrieving the length (Bug 8513)

........
r51161 | tilghman | 2007-01-16 14:50:04 -0700 (Tue, 16 Jan 2007) | 2 lines

Add documentation walkthrough on getting Postgres to work with voicemail (from Issue 8513)

........
r51194 | tilghman | 2007-01-17 13:52:21 -0700 (Wed, 17 Jan 2007) | 4 lines

When ast_strip_quoted was called with a zero-length string, it would treat a
NULL as if it were the quoting character (and would thus return the string
in memory immediately following the passed-in string).

........
r51197 | russell | 2007-01-17 14:17:21 -0700 (Wed, 17 Jan 2007) | 3 lines

Move the check for a failure of ast_channel_alloc() to before locking the
pvt structure again.  Otherwise, on a failure, this will cause a deadlock.

........

Added:
    team/murf/bug8574-1.2/doc/voicemail_odbc_postgresql.txt
      - copied unchanged from r51197, branches/1.2/doc/voicemail_odbc_postgresql.txt
Modified:
    team/murf/bug8574-1.2/   (props changed)
    team/murf/bug8574-1.2/apps/app_voicemail.c
    team/murf/bug8574-1.2/channels/chan_sip.c
    team/murf/bug8574-1.2/channels/chan_zap.c
    team/murf/bug8574-1.2/res/res_features.c
    team/murf/bug8574-1.2/utils.c

Propchange: team/murf/bug8574-1.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 17 18:10:43 2007
@@ -1,1 +1,1 @@
-/branches/1.2:1-50988
+/branches/1.2:1-51209

Modified: team/murf/bug8574-1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8574-1.2/apps/app_voicemail.c?view=diff&rev=51210&r1=51209&r2=51210
==============================================================================
--- team/murf/bug8574-1.2/apps/app_voicemail.c (original)
+++ team/murf/bug8574-1.2/apps/app_voicemail.c Wed Jan 17 18:10:43 2007
@@ -932,7 +932,7 @@
 			}
 			if (!strcasecmp(coltitle, "recording")) {
 				off_t offset;
-				res = SQLGetData(stmt, x + 1, SQL_BINARY, NULL, 0, &colsize);
+				res = SQLGetData(stmt, x + 1, SQL_BINARY, rowdata, 0, &colsize);
 				fdlen = colsize;
 				if (fd > -1) {
 					char tmp[1]="";
@@ -944,14 +944,13 @@
 					}
 					/* Read out in small chunks */
 					for (offset = 0; offset < colsize; offset += CHUNKSIZE) {
-						/* +1 because SQLGetData likes null-terminating binary data */
-						if ((fdm = mmap(NULL, CHUNKSIZE + 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == -1) {
+						if ((fdm = mmap(NULL, CHUNKSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset)) == (void *)-1) {
 							ast_log(LOG_WARNING, "Could not mmap the output file: %s (%d)\n", strerror(errno), errno);
 							SQLFreeHandle(SQL_HANDLE_STMT, stmt);
 							goto yuck;
 						} else {
-							res = SQLGetData(stmt, x + 1, SQL_BINARY, fdm, CHUNKSIZE + 1, NULL);
-							munmap(fdm, 0);
+							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);
 								unlink(full_fn);

Modified: team/murf/bug8574-1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8574-1.2/channels/chan_sip.c?view=diff&rev=51210&r1=51209&r2=51210
==============================================================================
--- team/murf/bug8574-1.2/channels/chan_sip.c (original)
+++ team/murf/bug8574-1.2/channels/chan_sip.c Wed Jan 17 18:10:43 2007
@@ -2782,11 +2782,11 @@
 	ast_mutex_unlock(&i->lock);
 	/* Don't hold a sip pvt lock while we allocate a channel */
 	tmp = ast_channel_alloc(1);
-	ast_mutex_lock(&i->lock);
 	if (!tmp) {
 		ast_log(LOG_WARNING, "Unable to allocate SIP channel structure\n");
 		return NULL;
 	}
+	ast_mutex_lock(&i->lock);
 	tmp->tech = &sip_tech;
 	/* Select our native format based on codec preference until we receive
 	   something from another device to the contrary. */

Modified: team/murf/bug8574-1.2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8574-1.2/channels/chan_zap.c?view=diff&rev=51210&r1=51209&r2=51210
==============================================================================
--- team/murf/bug8574-1.2/channels/chan_zap.c (original)
+++ team/murf/bug8574-1.2/channels/chan_zap.c Wed Jan 17 18:10:43 2007
@@ -10440,9 +10440,15 @@
 		} else if (!strcasecmp(v->name, "group")) {
 			cur_group = ast_get_group(v->value);
 		} else if (!strcasecmp(v->name, "callgroup")) {
-			cur_callergroup = ast_get_group(v->value);
+			if (!strcasecmp(v->value, "none"))
+				cur_callergroup = 0;
+			else
+				cur_callergroup = ast_get_group(v->value);
 		} else if (!strcasecmp(v->name, "pickupgroup")) {
-			cur_pickupgroup = ast_get_group(v->value);
+			if (!strcasecmp(v->value, "none"))
+				cur_pickupgroup = 0;
+			else
+				cur_pickupgroup = ast_get_group(v->value);
 		} else if (!strcasecmp(v->name, "immediate")) {
 			immediate = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "transfertobusy")) {

Modified: team/murf/bug8574-1.2/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8574-1.2/res/res_features.c?view=diff&rev=51210&r1=51209&r2=51210
==============================================================================
--- team/murf/bug8574-1.2/res/res_features.c (original)
+++ team/murf/bug8574-1.2/res/res_features.c Wed Jan 17 18:10:43 2007
@@ -1774,6 +1774,8 @@
 			ast_verbose(VERBOSE_PREFIX_3 "Channel %s connected to parked call %d\n", chan->name, park);
 
 		memset(&config, 0, sizeof(struct ast_bridge_config));
+		ast_set_flag(&(config.features_callee), AST_FEATURE_REDIRECT);
+		ast_set_flag(&(config.features_caller), AST_FEATURE_REDIRECT);
 		res = ast_bridge_call(chan, peer, &config);
 
 		/* Simulate the PBX hanging up */

Modified: team/murf/bug8574-1.2/utils.c
URL: http://svn.digium.com/view/asterisk/team/murf/bug8574-1.2/utils.c?view=diff&rev=51210&r1=51209&r2=51210
==============================================================================
--- team/murf/bug8574-1.2/utils.c (original)
+++ team/murf/bug8574-1.2/utils.c Wed Jan 17 18:10:43 2007
@@ -520,7 +520,7 @@
 	char *q;
 
 	s = ast_strip(s);
-	if ((q = strchr(beg_quotes, *s))) {
+	if ((q = strchr(beg_quotes, *s)) && *q != '\0') {
 		e = s + strlen(s) - 1;
 		if (*e == *(end_quotes + (q - beg_quotes))) {
 			s++;



More information about the asterisk-commits mailing list