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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Feb 12 17:52:19 CST 2011


Author: may
Date: Sat Feb 12 17:52:15 2011
New Revision: 307679

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=307679
Log:
Merged revisions 307678 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/team/may/ooh323_ipv6

................
  r307678 | may | 2011-02-13 02:28:01 +0300 (Sun, 13 Feb 2011) | 9 lines
  
  Merged revisions 307677 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/trunk
  
  ........
    r307677 | may | 2011-02-13 02:25:58 +0300 (Sun, 13 Feb 2011) | 2 lines
    
    change malloc to ast_calloc calls to prevent crash of asterisk
  ........
................

Modified:
    team/may/ooh323_ipv6_direct_rtp/   (props changed)
    team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
    team/may/ooh323_ipv6_direct_rtp/addons/ooh323cDriver.c

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-custom (original)
+++ svnmerge-custom Sat Feb 12 17:52:15 2011
@@ -1,1 +1,1 @@
-/team/may/ooh323_ipv6:1-307670
+/team/may/ooh323_ipv6:1-307678

Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Feb 12 17:52:15 2011
@@ -1,1 +1,1 @@
-/trunk:1-307560
+/trunk:1-307677

Modified: team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c?view=diff&rev=307679&r1=307678&r2=307679
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c Sat Feb 12 17:52:15 2011
@@ -482,28 +482,6 @@
 	ast_mutex_init(&pvt->lock);
 	ast_mutex_lock(&pvt->lock);
 
-	/* ast_sockaddr_copy(&tmp, &bindaddr);
-	if (!(pvt->rtp = ast_rtp_instance_new("asterisk", sched, &tmp, NULL))) {
-		ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", 
-				  strerror(errno));
-		ast_mutex_unlock(&pvt->lock);
-		ast_mutex_destroy(&pvt->lock);
-		ast_free(pvt);
-		return NULL;
-	}
- 
-	ast_rtp_instance_set_qos(pvt->rtp, gTOS, 0, "ooh323-rtp");
-
-	if (!(pvt->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &tmp))) {
-		ast_log(LOG_WARNING, "Unable to create UDPTL session: %s\n",
-				strerror(errno));
-		ast_mutex_unlock(&pvt->lock);
-		ast_mutex_destroy(&pvt->lock);
-		ast_free(pvt);
-		return NULL;
-	} 
-
-	ast_udptl_set_error_correction_scheme(pvt->udptl, UDPTL_ERROR_CORRECTION_NONE); */
 	pvt->faxmode = 0;
 	pvt->t38support = gT38Support;
 	pvt->rtptimeout = gRTPTimeout;
@@ -1429,7 +1407,7 @@
 
 	ast_mutex_lock(&p->lock);
 
-	ast_format_copy(&p->writeformat, fmt);
+	ast_format_copy(&(p->writeformat), fmt);
 
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
@@ -1487,7 +1465,7 @@
 
 	ast_mutex_lock(&p->lock);
 
-	ast_format_copy(&p->readformat, fmt);
+	ast_format_copy(&(p->readformat), fmt);
 
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
@@ -2194,11 +2172,7 @@
    	user = ast_calloc(1,sizeof(struct ooh323_user));
 	if (user) {
 		memset(user, 0, sizeof(struct ooh323_user));
-		if (!(user->cap = ast_format_cap_alloc_nolock())) {
-			ast_free(user);
-			return NULL;
-		}
-		if (!(user->cap = ast_format_cap_alloc_nolock())) {
+		if (!(user->cap = ast_format_cap_alloc())) {
 			ast_free(user);
 			return NULL;
 		}
@@ -2313,11 +2287,7 @@
 	peer = ast_calloc(1, sizeof(*peer));
 	if (peer) {
 		memset(peer, 0, sizeof(struct ooh323_peer));
-		if (!(peer->cap = ast_format_cap_alloc_nolock())) {
-			ast_free(peer);
-			return NULL;
-		}
-		if (!(peer->cap = ast_format_cap_alloc_nolock())) {
+		if (!(peer->cap = ast_format_cap_alloc())) {
 			ast_free(peer);
 			return NULL;
 		}

Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323cDriver.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323cDriver.c?view=diff&rev=307679&r1=307678&r2=307679
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323cDriver.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323cDriver.c Sat Feb 12 17:52:15 2011
@@ -145,7 +145,7 @@
 
 /* make new thread */
  if (cur == NULL) {
-	if (!(cur = ast_malloc(sizeof(struct callthread)))) {
+	if (!(cur = ast_calloc(1, sizeof(struct callthread)))) {
 		ast_log(LOG_ERROR, "Unable to allocate thread structure for call %s\n",
 							call->callToken);
 		return -1;




More information about the svn-commits mailing list