From: Damien Wedhorn Date: Wed, 6 Feb 2013 08:42:09 +0000 (+0000) Subject: Fix reload skinny with active devices. X-Git-Tag: 11.4.0-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66198610a7a62064e28859eb56dc198adccbf9a6;p=thirdparty%2Fasterisk.git Fix reload skinny with active devices. Patch ensures that d->activeline and l->activesub are moved over to the new device and line so that on callend the appropriate subs can be found to complete hangup before device resets. (closes issue ASTERISK-16610) Reported by: wedhorn Tested by: snuffy, myself Patches: skinny-reloadactive01.diff uploaded by wedhorn (license 5019) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@380942 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index d3e4a29416..c1de81a631 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -7695,9 +7695,13 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca } ast_mutex_lock(<emp->lock); l->instance = ltemp->instance; + if (l == temp->activeline) { + d->activeline = l; + } if (!AST_LIST_EMPTY(<emp->sub)) { ast_mutex_lock(&l->lock); l->sub = ltemp->sub; + l->activesub = ltemp->activesub; AST_LIST_TRAVERSE(&l->sub, sub, list) { sub->line = l; }