Merged revisions 390 via svnmerge from

https://origsvn.digium.com/svn/libpri/branches/1.4

................
r390 | mattf | 2007-01-22 16:29:24 -0600 (Mon, 22 Jan 2007) | 10 lines

Merged revisions 389 via svnmerge from 
https://origsvn.digium.com/svn/libpri/branches/1.2

........
r389 | mattf | 2007-01-22 16:20:59 -0600 (Mon, 22 Jan 2007) | 2 lines

Make sure we send DISCONNECT if we reached the active state and a call is disconnected, regardless of cause code.

........

................


git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@393 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Matthew Fredrickson
2007-01-23 22:02:44 +00:00
parent bcee9e2fd6
commit ec3b7c156e

6
q931.c
View File

@@ -2963,8 +2963,6 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause)
/* sent CONNECT */
case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING:
/* we sent CALL_PROCEEDING */
case Q931_CALL_STATE_ACTIVE:
/* received CONNECT */
case Q931_CALL_STATE_OVERLAP_RECEIVING:
/* received SETUP_ACKNOWLEDGE */
/* send DISCONNECT in general */
@@ -2978,6 +2976,10 @@ int q931_hangup(struct pri *pri, q931_call *c, int cause)
} else
pri_error(pri, "Wierd, doing nothing but this shouldn't happen, ourstate %s, peerstate %s\n",callstate2str(c->ourcallstate),callstate2str(c->peercallstate));
break;
case Q931_CALL_STATE_ACTIVE:
/* received CONNECT */
q931_disconnect(pri,c,cause);
break;
case Q931_CALL_STATE_DISCONNECT_REQUEST:
/* sent DISCONNECT */
q931_release(pri,c,cause);