Change directly setting _softhangup in sig_ss7.c to use ast_softhangup_nolock().
authorRichard Mudgett <rmudgett@digium.com>
Wed, 7 Mar 2012 18:33:12 +0000 (18:33 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 7 Mar 2012 18:33:12 +0000 (18:33 +0000)
Update to:
(issue ASTERISK-19372)
........

Merged revisions 358530 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 358531 from http://svn.asterisk.org/svn/asterisk/branches/10

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358532 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_ss7.c

index ccea949..490d767 100644 (file)
@@ -459,8 +459,11 @@ static inline void ss7_hangup_cics(struct sig_ss7_linkset *linkset, int startcic
        for (i = 0; i < linkset->numchans; i++) {
                if (linkset->pvts[i] && (linkset->pvts[i]->dpc == dpc && ((linkset->pvts[i]->cic >= startcic) && (linkset->pvts[i]->cic <= endcic)))) {
                        sig_ss7_lock_private(linkset->pvts[i]);
-                       if (linkset->pvts[i]->owner)
-                               ast_channel_softhangup_internal_flag_add(linkset->pvts[i]->owner, AST_SOFTHANGUP_DEV);
+                       sig_ss7_lock_owner(linkset, i);
+                       if (linkset->pvts[i]->owner) {
+                               ast_softhangup_nolock(linkset->pvts[i]->owner, AST_SOFTHANGUP_DEV);
+                               ast_channel_unlock(linkset->pvts[i]->owner);
+                       }
                        sig_ss7_unlock_private(linkset->pvts[i]);
                }
        }
@@ -1673,7 +1676,7 @@ int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condi
        case AST_CONTROL_BUSY:
                if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
                        ast_channel_hangupcause_set(chan, AST_CAUSE_USER_BUSY);
-                       ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
+                       ast_softhangup_nolock(chan, AST_SOFTHANGUP_DEV);
                        res = 0;
                        break;
                }
@@ -1737,7 +1740,7 @@ int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condi
        case AST_CONTROL_INCOMPLETE:
                if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
                        ast_channel_hangupcause_set(chan, AST_CAUSE_INVALID_NUMBER_FORMAT);
-                       ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
+                       ast_softhangup_nolock(chan, AST_SOFTHANGUP_DEV);
                        res = 0;
                        break;
                }
@@ -1747,7 +1750,7 @@ int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condi
        case AST_CONTROL_CONGESTION:
                if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
                        ast_channel_hangupcause_set(chan, AST_CAUSE_CONGESTION);
-                       ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
+                       ast_softhangup_nolock(chan, AST_SOFTHANGUP_DEV);
                        res = 0;
                        break;
                }