[svn-commits] may: branch may/ooh323_ipv6_direct_rtp r321508 - in /team/may/ooh323_ipv6_dir...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat May 28 04:25:33 CDT 2011


Author: may
Date: Sat May 28 04:25:25 2011
New Revision: 321508

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321508
Log:
Merged revisions 321156,321212,321289,321331-321332,321334,321336,321338,321393,321445 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r321156 | markm | 2011-05-27 01:50:06 +0400 (Fri, 27 May 2011) | 17 lines
  
  Merged revisions 321155 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321155 | markm | 2011-05-26 17:48:45 -0400 (Thu, 26 May 2011) | 10 lines
    
    Fixed build problem with dev mode enabled, which was caused by commit 321100.  Reformulated patch to be more generic.
    
    Moved the sip uri parse variable initalization to parse_uri_full in reqresp_parser.c.  This will ensure that any use of parse uri will have null output variables if the parse fails.
    
    (closes issue #19346)
    Reported by: kobaz
    Tested by: kobaz,JonathanRose
    
    Review: [full review board URL with trailing slash]
  ........
................
  r321212 | alecdavis | 2011-05-27 12:37:59 +0400 (Fri, 27 May 2011) | 22 lines
  
  Merged revisions 321211 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321211 | alecdavis | 2011-05-27 20:31:15 +1200 (Fri, 27 May 2011) | 16 lines
    
    Fix *8 directed pickup locks system during pickupsound play out
    
    move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
    This stop the clash of 2 threads trying to write audio to same channel.
    In addition fixes choppy audio beep in issue 19177.
     
     (issue #18654)
     (issue #19177)
     Reported by: Docent
     Patches: 
          review1232-1.8.diff.txt alecdavis (license 585)
     Tested by: alecdavis
     
    Review: https://reviewboard.asterisk.org/r/1232/
  ........
................
  r321289 | jrose | 2011-05-27 20:35:49 +0400 (Fri, 27 May 2011) | 9 lines
  
  Merged revisions 321273 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321273 | jrose | 2011-05-27 09:59:34 -0500 (Fri, 27 May 2011) | 3 lines
    
    markm committed a patch I was working on yesterday, this fixes it to mesh up with suggestions by mnicholson.
  ........
................
  r321331 | rmudgett | 2011-05-28 01:34:04 +0400 (Sat, 28 May 2011) | 15 lines
  
  Merged revisions 321330 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321330 | rmudgett | 2011-05-27 16:31:25 -0500 (Fri, 27 May 2011) | 8 lines
    
    The app_privacy args have undocumented "options" position, interferes with "context" position.
    
    * Add documention for unused "options" position to match existing code.
    The trunk(v1.10) version will remove the unused options position.
    
    (closes issue #19273)
    Reported by: mdavenport
  ........
................
  r321332 | rmudgett | 2011-05-28 01:37:05 +0400 (Sat, 28 May 2011) | 1 line
  
  Add note about PrivacyManager to UPGRADE.txt
................
  r321334 | lmadsen | 2011-05-28 01:40:52 +0400 (Sat, 28 May 2011) | 15 lines
  
  Merged revisions 321333 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321333 | lmadsen | 2011-05-27 17:40:23 -0400 (Fri, 27 May 2011) | 7 lines
    
    Allow parking lot hints and musicclass to be set.
    
    (closes issue #19378)
    Reported by: sboily_proformatique
    Patches:
          pf_parkinghint_music_fix uploaded by sboily proformatique (license 206)
    Tested by: russell
  ........
................
  r321336 | lmadsen | 2011-05-28 01:55:39 +0400 (Sat, 28 May 2011) | 14 lines
  
  Blocked revisions 321335 via svnmerge
  
  ........
    r321335 | lmadsen | 2011-05-27 17:54:54 -0400 (Fri, 27 May 2011) | 7 lines
    
    Fix issue with playback of H.261 video.
    
    (closes issue #19379)
    Reported by: neutrino88
    Patches:
          videoprompt.patch uploaded by neutrino88 (license 297)
    (changes by russell)
  ........
................
  r321338 | rmudgett | 2011-05-28 02:09:03 +0400 (Sat, 28 May 2011) | 16 lines
  
  Merged revisions 321337 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  Also revert -r321331 and -r321332.
  
  ........
    r321337 | rmudgett | 2011-05-27 17:06:43 -0500 (Fri, 27 May 2011) | 7 lines
    
    The app_privacy args have undocumented "options" position, interferes with "context" position.
    
    * Add documention for unused "options" position to match existing code.
    
    (closes issue #19273)
    Reported by: mdavenport
  ........
................
  r321393 | rmudgett | 2011-05-28 03:46:07 +0400 (Sat, 28 May 2011) | 19 lines
  
  Merged revisions 321392 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321392 | rmudgett | 2011-05-27 18:45:41 -0500 (Fri, 27 May 2011) | 12 lines
  
    Crash when using hagi and no servers are available.
  
    When none of the servers returned by the SRV querey respond, asterisk
    crashes.  The problem is that if the loop over all the SRV entries
    finishes then the srv_context has already been cleaned up.
  
    * Make ast_srv_cleanup() check to see if the context is already cleaned
    up.
  
    (closes issue #19256)
    Reported by: byronclark
  ........
................
  r321445 | rmudgett | 2011-05-28 04:29:48 +0400 (Sat, 28 May 2011) | 11 lines
  
  Merged revisions 321436 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r321436 | rmudgett | 2011-05-27 19:27:52 -0500 (Fri, 27 May 2011) | 4 lines
    
    Some hagi launch cleanup.
    
    Inspired by issue 19256.  This patch would also fix the crash.
  ........
................

Modified:
    team/may/ooh323_ipv6_direct_rtp/   (props changed)
    team/may/ooh323_ipv6_direct_rtp/apps/app_privacy.c
    team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
    team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c
    team/may/ooh323_ipv6_direct_rtp/main/features.c
    team/may/ooh323_ipv6_direct_rtp/main/srv.c
    team/may/ooh323_ipv6_direct_rtp/res/res_agi.c

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- branch-1.8-blocked (original)
+++ branch-1.8-blocked Sat May 28 04:25:25 2011
@@ -1,1 +1,1 @@
-/branches/1.8:299531,313436,317858,317861
+/branches/1.8:299531,313436,317858,317861,321335

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat May 28 04:25:25 2011
@@ -1,1 +1,1 @@
-/trunk:1-313143,313191,313280,313367,313383-313481,313483-313744,313781-313906,313908-313943,313945-315447,315453-316213,316216-316520,316552-319000,319024-320000,320013-321101
+/trunk:1-313481,313483-313906,313908-313943,313945-321507

Modified: team/may/ooh323_ipv6_direct_rtp/apps/app_privacy.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/apps/app_privacy.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/apps/app_privacy.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/apps/app_privacy.c Sat May 28 04:25:25 2011
@@ -52,6 +52,9 @@
 			</parameter>
 			<parameter name="minlength">
 				<para>Minimum allowable digits in the input callerid number. Defaults to <literal>10</literal>.</para>
+			</parameter>
+			<parameter name="options">
+				<para>Position reserved for options.</para>
 			</parameter>
 			<parameter name="context">
 				<para>Context to check the given callerid against patterns.</para>

Modified: team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/chan_sip.c Sat May 28 04:25:25 2011
@@ -13550,21 +13550,8 @@
 }
 
 /*! \brief parse uri in a way that allows semicolon stripping if legacy mode is enabled */
-static int parse_uri_legacy_check(char *uri, const char *scheme, char **user, char **pass, char **domain, char **transport) {
-	/* Assume invalid to start */
-	if (user) {
-		*user = 0;
-	}
-	if (pass) {
-		*pass = 0;
-	}
-	if (domain) {
-		*domain = 0;
-	}
-	if (transport) {
-		*transport = 0;
-	}
-
+static int parse_uri_legacy_check(char *uri, const char *scheme, char **user, char **pass, char **domain, char **transport)
+{
 	int ret = parse_uri(uri, scheme, user, pass, domain, transport);
 	if (sip_cfg.legacy_useroption_parsing) { /* if legacy mode is active, strip semis from the user field */
 		char *p;

Modified: team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c Sat May 28 04:25:25 2011
@@ -41,6 +41,27 @@
 	char *endparams = NULL;
 	char *c = NULL;
 	int error = 0;
+
+	/*
+	 * Initialize requested strings - some functions don't care if parse_uri fails
+	 * and will attempt to use string pointers passed into parse_uri even after a
+	 * parse_uri failure
+	 */
+	if (user) {
+		*user = "";
+	}
+	if (pass) {
+		*pass = "";
+	}
+	if (domain) {
+		*domain = "";
+	}
+	if (headers) {
+		*headers = "";
+	}
+	if (residue) {
+		*residue = "";
+	}
 
 	/* check for valid input */
 	if (ast_strlen_zero(uri)) {

Modified: team/may/ooh323_ipv6_direct_rtp/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/features.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/features.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/features.c Sat May 28 04:25:25 2011
@@ -4787,6 +4787,10 @@
 			ast_copy_string(parkinglot->parking_con, confvar->value, sizeof(parkinglot->parking_con));
 		} else if (!strcasecmp(confvar->name, "parkext")) {
 			ast_copy_string(parkinglot->parkext, confvar->value, sizeof(parkinglot->parkext));
+		} else if (!strcasecmp(confvar->name, "parkinghints")) {
+			parkinglot->parkaddhints = ast_true(confvar->value);
+		} else if (!strcasecmp(confvar->name, "parkedmusicclass")) {
+			ast_copy_string(parkinglot->mohclass, confvar->value, sizeof(parkinglot->mohclass));
 		} else if (!strcasecmp(confvar->name, "parkingtime")) {
 			if ((sscanf(confvar->value, "%30d", &parkinglot->parkingtime) != 1) || (parkinglot->parkingtime < 1)) {
 				ast_log(LOG_WARNING, "%s is not a valid parkingtime\n", confvar->value);
@@ -5782,20 +5786,14 @@
 		ast_log(LOG_NOTICE, "pickup %s attempt by %s\n", target->name, chan->name);
 
 		res = ast_do_pickup(chan, target);
+		ast_channel_unlock(target);
 		if (!res) {
 			if (!ast_strlen_zero(pickupsound)) {
-				/*!
-				 * \todo We are not the bridge thread when we inject this sound
-				 * so we need to hold the target channel lock while the sound is
-				 * played.  A better way needs to be found as this pauses the
-				 * system.
-				 */
-				ast_stream_and_wait(target, pickupsound, "");
+				pbx_builtin_setvar_helper(target, "BRIDGE_PLAY_SOUND", pickupsound);
 			}
 		} else {
 			ast_log(LOG_WARNING, "pickup %s failed by %s\n", target->name, chan->name);
 		}
-		ast_channel_unlock(target);
 		target = ast_channel_unref(target);
 	}
 

Modified: team/may/ooh323_ipv6_direct_rtp/main/srv.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/srv.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/srv.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/srv.c Sat May 28 04:25:25 2011
@@ -249,7 +249,11 @@
 	const char *host;
 	unsigned short port;
 
-	while (!(ast_srv_lookup(context, NULL, &host, &port)));
+	if (*context) {
+		/* We have a context to clean up. */
+		while (!(ast_srv_lookup(context, NULL, &host, &port))) {
+		}
+	}
 }
 
 int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service)

Modified: team/may/ooh323_ipv6_direct_rtp/res/res_agi.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/res/res_agi.c?view=diff&rev=321508&r1=321507&r2=321508
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/res/res_agi.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/res/res_agi.c Sat May 28 04:25:25 2011
@@ -1461,21 +1461,21 @@
 	}
 	if (!(hp = ast_gethostbyname(host, &ahp))) {
 		ast_log(LOG_WARNING, "Unable to locate host '%s'\n", host);
-		return -1;
+		return AGI_RESULT_FAILURE;
 	}
 	if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
 		ast_log(LOG_WARNING, "Unable to create socket: %s\n", strerror(errno));
-		return -1;
+		return AGI_RESULT_FAILURE;
 	}
 	if ((flags = fcntl(s, F_GETFL)) < 0) {
 		ast_log(LOG_WARNING, "Fcntl(F_GETFL) failed: %s\n", strerror(errno));
 		close(s);
-		return -1;
+		return AGI_RESULT_FAILURE;
 	}
 	if (fcntl(s, F_SETFL, flags | O_NONBLOCK) < 0) {
 		ast_log(LOG_WARNING, "Fnctl(F_SETFL) failed: %s\n", strerror(errno));
 		close(s);
-		return -1;
+		return AGI_RESULT_FAILURE;
 	}
 	memset(&addr_in, 0, sizeof(addr_in));
 	addr_in.sin_family = AF_INET;
@@ -1542,7 +1542,7 @@
 static enum agi_result launch_ha_netscript(char *agiurl, char *argv[], int *fds)
 {
 	char *host, *script;
-	enum agi_result result = AGI_RESULT_FAILURE;
+	enum agi_result result;
 	struct srv_context *context = NULL;
 	int srv_ret;
 	char service[256];
@@ -1576,16 +1576,20 @@
 		if (result == AGI_RESULT_FAILURE || result == AGI_RESULT_NOTFOUND) {
 			ast_log(LOG_WARNING, "AGI request failed for host '%s' (%s:%d)\n", host, srvhost, srvport);
 		} else {
-			break;
-		}
-	}
+			/* The script launched so we must cleanup the context. */
+			ast_srv_cleanup(&context);
+			return result;
+		}
+	}
+	/*
+	 * The DNS SRV lookup failed or we ran out of servers to check.
+	 * ast_srv_lookup() has already cleaned up the context for us.
+	 */
 	if (srv_ret < 0) {
 		ast_log(LOG_WARNING, "SRV lookup failed for %s\n", agiurl);
-	} else {
-        ast_srv_cleanup(&context);
-    }
-
-	return result;
+	}
+
+	return AGI_RESULT_FAILURE;
 }
 
 static enum agi_result launch_script(struct ast_channel *chan, char *script, char *argv[], int *fds, int *efd, int *opid)




More information about the svn-commits mailing list