[asterisk-commits] bebuild: tag 1.8.12.1 r367850 - in /tags/1.8.12.1: ./ channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 29 13:54:19 CDT 2012
Author: bebuild
Date: Tue May 29 13:54:14 2012
New Revision: 367850
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367850
Log:
Merge 367843,367781
Removed:
tags/1.8.12.1/asterisk-1.8.12.0-summary.html
tags/1.8.12.1/asterisk-1.8.12.0-summary.txt
Modified:
tags/1.8.12.1/ (props changed)
tags/1.8.12.1/.version
tags/1.8.12.1/ChangeLog
tags/1.8.12.1/channels/chan_iax2.c
tags/1.8.12.1/channels/chan_skinny.c
Propchange: tags/1.8.12.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 29 13:54:14 2012
@@ -1,1 +1,1 @@
-/branches/1.8:363102,363106,363141,364706
+/branches/1.8:363102,363106,363141,364706,367781,367843
Modified: tags/1.8.12.1/.version
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.12.1/.version?view=diff&rev=367850&r1=367849&r2=367850
==============================================================================
--- tags/1.8.12.1/.version (original)
+++ tags/1.8.12.1/.version Tue May 29 13:54:14 2012
@@ -1,1 +1,1 @@
-1.8.12.0
+1.8.12.1
Modified: tags/1.8.12.1/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.12.1/ChangeLog?view=diff&rev=367850&r1=367849&r2=367850
==============================================================================
--- tags/1.8.12.1/ChangeLog (original)
+++ tags/1.8.12.1/ChangeLog Tue May 29 13:54:14 2012
@@ -1,3 +1,11 @@
+2012-05-29 Asterisk Development Team <asteriskteam at digium.com>
+
+ * Asterisk 1.8.12.1 Released.
+
+ * AST-2012-007
+
+ * AST-2012-008
+
2012-05-02 Asterisk Development Team <asteriskteam at digium.com>
* Asterisk 1.8.12.0 Released.
Modified: tags/1.8.12.1/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.12.1/channels/chan_iax2.c?view=diff&rev=367850&r1=367849&r2=367850
==============================================================================
--- tags/1.8.12.1/channels/chan_iax2.c (original)
+++ tags/1.8.12.1/channels/chan_iax2.c Tue May 29 13:54:14 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: tags/1.8.12.1/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.12.1/channels/chan_skinny.c?view=diff&rev=367850&r1=367849&r2=367850
==============================================================================
--- tags/1.8.12.1/channels/chan_skinny.c (original)
+++ tags/1.8.12.1/channels/chan_skinny.c Tue May 29 13:54:14 2012
@@ -2677,6 +2677,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
@@ -3810,6 +3814,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);
@@ -3913,7 +3922,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;
}
@@ -3976,6 +3985,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);
@@ -4374,7 +4388,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);
@@ -4608,8 +4628,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)
@@ -4635,8 +4660,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)
@@ -4689,6 +4719,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 */
@@ -4820,6 +4855,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