[asterisk-commits] bebuild: tag certified-1.8.11-cert2 r367849 - in /certified/tags/1.8.11-cert2...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 29 13:52:09 CDT 2012


Author: bebuild
Date: Tue May 29 13:52:04 2012
New Revision: 367849

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367849
Log:
Merge 367846,367847

Removed:
    certified/tags/1.8.11-cert2/certified-asterisk-1.8.11-cert1-summary.html
    certified/tags/1.8.11-cert2/certified-asterisk-1.8.11-cert1-summary.txt
Modified:
    certified/tags/1.8.11-cert2/   (props changed)
    certified/tags/1.8.11-cert2/.version
    certified/tags/1.8.11-cert2/ChangeLog
    certified/tags/1.8.11-cert2/channels/chan_iax2.c
    certified/tags/1.8.11-cert2/channels/chan_skinny.c

Propchange: certified/tags/1.8.11-cert2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 29 13:52:04 2012
@@ -1,1 +1,2 @@
-/branches/1.8:357665,358162,359656,359706,359979,360086,360884
+/branches/1.8:357665,358162,359656,359706,359979,360086,360884,367781,367843
+/certified/branches/1.8.11:367846-367847

Modified: certified/tags/1.8.11-cert2/.version
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.11-cert2/.version?view=diff&rev=367849&r1=367848&r2=367849
==============================================================================
--- certified/tags/1.8.11-cert2/.version (original)
+++ certified/tags/1.8.11-cert2/.version Tue May 29 13:52:04 2012
@@ -1,1 +1,1 @@
-1.8.11-cert1
+1.8.11-cert2

Modified: certified/tags/1.8.11-cert2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.11-cert2/ChangeLog?view=diff&rev=367849&r1=367848&r2=367849
==============================================================================
--- certified/tags/1.8.11-cert2/ChangeLog (original)
+++ certified/tags/1.8.11-cert2/ChangeLog Tue May 29 13:52:04 2012
@@ -1,3 +1,11 @@
+2012-05-29  Asterisk Development Team <asteriskteam at digium.com>
+
+	* Certified Asterisk 1.8.11-cert2 Released.
+
+	* AST-2012-007
+
+	* AST-2012-008
+
 2012-04-25  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Certified Asterisk 1.8.11-cert1 Released.

Modified: certified/tags/1.8.11-cert2/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.11-cert2/channels/chan_iax2.c?view=diff&rev=367849&r1=367848&r2=367849
==============================================================================
--- certified/tags/1.8.11-cert2/channels/chan_iax2.c (original)
+++ certified/tags/1.8.11-cert2/channels/chan_iax2.c Tue May 29 13:52:04 2012
@@ -1842,24 +1842,25 @@
  *  we have received a destination call number. */
 static int queue_signalling(struct chan_iax2_pvt *pvt, struct ast_frame *f)
 {
-	struct signaling_queue_entry *new;
+	struct signaling_queue_entry *qe;
 
 	if (f->frametype == AST_FRAME_IAX || !pvt->hold_signaling) {
 		return 1; /* do not queue this frame */
-	} else if (!(new = ast_calloc(1, sizeof(struct signaling_queue_entry)))) {
+	} else if (!(qe = ast_calloc(1, sizeof(struct signaling_queue_entry)))) {
 		return -1;  /* out of memory */
 	}
 
-	memcpy(&new->f, f, sizeof(new->f)); /* copy ast_frame into our queue entry */
-
-	if (new->f.datalen) { /* if there is data in this frame copy it over as well */
-		if (!(new->f.data.ptr = ast_calloc(1, new->f.datalen))) {
-			free_signaling_queue_entry(new);
+	/* copy ast_frame into our queue entry */
+	qe->f = *f;
+	if (qe->f.datalen) {
+		/* if there is data in this frame copy it over as well */
+		if (!(qe->f.data.ptr = ast_malloc(qe->f.datalen))) {
+			free_signaling_queue_entry(qe);
 			return -1;
 		}
-		memcpy(new->f.data.ptr, f->data.ptr, sizeof(*new->f.data.ptr));
-	}
-	AST_LIST_INSERT_TAIL(&pvt->signaling_queue, new, next);
+		memcpy(qe->f.data.ptr, f->data.ptr, qe->f.datalen);
+	}
+	AST_LIST_INSERT_TAIL(&pvt->signaling_queue, qe, next);
 
 	return 0;
 }
@@ -4160,7 +4161,16 @@
 	int needfree = 0;
 	struct ast_channel *owner = NULL;
 	struct ast_channel *bridge = NULL;
-	
+
+	/*
+	 * Clear fr->af.data if there is no data in the buffer.  Things
+	 * like AST_CONTROL_HOLD without a suggested music class must
+	 * have a NULL pointer.
+	 */
+	if (!fr->af.datalen) {
+		memset(&fr->af.data, 0, sizeof(fr->af.data));
+	}
+
 	/* Attempt to recover wrapped timestamps */
 	unwrap_timestamp(fr);
 

Modified: certified/tags/1.8.11-cert2/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.11-cert2/channels/chan_skinny.c?view=diff&rev=367849&r1=367848&r2=367849
==============================================================================
--- certified/tags/1.8.11-cert2/channels/chan_skinny.c (original)
+++ certified/tags/1.8.11-cert2/channels/chan_skinny.c Tue May 29 13:52:04 2012
@@ -2684,6 +2684,10 @@
 	struct skinny_line *l = sub->parent;
 	struct skinny_device *d = l->device;
 
+	if (!d) {
+		return;
+	}
+
 	if (!c->caller.id.number.valid
 		|| ast_strlen_zero(c->caller.id.number.str)
 		|| !c->connected.id.number.valid
@@ -3817,6 +3821,11 @@
 	int res = 0;
 	int loop_pause = 100;
 
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return NULL;
+	}
+
 	ast_verb(3, "Starting simple switch on '%s@%s'\n", l->name, d->name);
 
 	len = strlen(d->exten);
@@ -3920,7 +3929,7 @@
 	struct skinny_line *l = sub->parent;
 	struct skinny_device *d = l->device;
 
-	if (!d->registered) {
+	if (!d || !d->registered) {
 		ast_log(LOG_ERROR, "Device not registered, cannot call %s\n", dest);
 		return -1;
 	}
@@ -3983,6 +3992,11 @@
 
 	l = sub->parent;
 	d = l->device;
+
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return 0;
+	}
 
 	if (skinnydebug)
 		ast_verb(3,"Hanging up %s/%d\n",d->name,sub->callid);
@@ -4381,7 +4395,13 @@
 	struct skinny_subchannel *sub = ast->tech_pvt;
 	struct skinny_line *l = sub->parent;
 	struct skinny_device *d = l->device;
-	struct skinnysession *s = d->session;
+	struct skinnysession *s;
+
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return -1;
+	}
+	s = d->session;
 
 	if (!s) {
 		ast_log(LOG_NOTICE, "Asked to indicate '%s' condition on channel %s, but session does not exist.\n", control2str(ind), ast->name);
@@ -4615,8 +4635,13 @@
 	struct skinny_device *d = l->device;
 
 	/* Don't try to hold a channel that doesn't exist */
-	if (!sub || !sub->owner)
+	if (!sub || !sub->owner) {
 		return 0;
+	}
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return 0;
+	}
 
 	/* Channel needs to be put on hold */
 	if (skinnydebug)
@@ -4642,8 +4667,13 @@
 	struct skinny_device *d = l->device;
 
 	/* Don't try to unhold a channel that doesn't exist */
-	if (!sub || !sub->owner)
+	if (!sub || !sub->owner) {
 		return 0;
+	}
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return 0;
+	}
 
 	/* Channel is on hold, so we will unhold */
 	if (skinnydebug)
@@ -4696,6 +4726,11 @@
 
 	l = sub->parent;
 	d = l->device;
+
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return -1;
+	}
 
 	if (!sub->related) {
 		/* Another sub has not been created so this must be first XFER press */
@@ -4827,6 +4862,11 @@
 	struct skinny_device *d = l->device;
 	struct ast_channel *c = sub->owner;
 	pthread_t t;
+
+	if (!d) {
+		ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+		return 0;
+	}
 
 	if (l->hookstate == SKINNY_ONHOOK) {
 		l->hookstate = SKINNY_OFFHOOK;




More information about the asterisk-commits mailing list