aboutsummaryrefslogtreecommitdiffstats
path: root/addons/ooh323c
diff options
context:
space:
mode:
authormay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-01 10:45:12 +0000
committermay <may@f38db490-d61c-443f-a65b-d21fe96a405b>2011-06-01 10:45:12 +0000
commitb77570f82793f9153ed6606698616e44ae0e9e52 (patch)
tree0ced3cf095e508f46972ee3161d229514336d4fb /addons/ooh323c
parenta5e85b79876484d29bbcd653d8475d8dbc4d5888 (diff)
Merged revisions 321528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321528 | may | 2011-06-01 14:40:19 +0400 (Wed, 01 Jun 2011) | 14 lines Fix double alerting, add forced alerting before answer Fix double alerting (it wasn't fixed here by issue #18542) Add forced alerting before connect (if it wasn't before) Try to send all packets from outgoing queue rather than one only Call goes into clearing state when disconnect command is received (closes issue #19361) Reported by: vmikhelson Patches: issue19361-3.patch uploaded by may213 (license 454) Tested by: vmikhelson ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@321529 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons/ooh323c')
-rw-r--r--addons/ooh323c/src/oochannels.c24
-rw-r--r--addons/ooh323c/src/ooh245.c2
2 files changed, 16 insertions, 10 deletions
diff --git a/addons/ooh323c/src/oochannels.c b/addons/ooh323c/src/oochannels.c
index 891a12d17..e3ac30fbb 100644
--- a/addons/ooh323c/src/oochannels.c
+++ b/addons/ooh323c/src/oochannels.c
@@ -682,10 +682,11 @@ int ooProcessCallFDSETsAndTimers
if (0 != call->pH245Channel && 0 != call->pH245Channel->sock)
{
- if(call->pH245Channel->outQueue.count>0)
- {
- if(ooPDWrite(pfds, nfds, call->pH245Channel->sock))
- ooSendMsg(call, OOH245MSG);
+ if(ooPDWrite(pfds, nfds, call->pH245Channel->sock)) {
+ while (call->pH245Channel->outQueue.count>0) {
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
else if(call->h245listener)
@@ -702,20 +703,23 @@ int ooProcessCallFDSETsAndTimers
{
if(ooPDWrite(pfds, nfds, call->pH225Channel->sock))
{
- if(call->pH225Channel->outQueue.count>0)
+ while (call->pH225Channel->outQueue.count>0)
{
OOTRACEDBGC3("Sending H225 message (%s, %s)\n",
call->callType, call->callToken);
- ooSendMsg(call, OOQ931MSG);
+ if (ooSendMsg(call, OOQ931MSG) != OO_OK)
+ break;
}
if(call->pH245Channel &&
call->pH245Channel->outQueue.count>0 &&
- OO_TESTFLAG (call->flags, OO_M_TUNNELING))
- {
+ OO_TESTFLAG (call->flags, OO_M_TUNNELING)) {
+ while (call->pH245Channel->outQueue.count>0) {
OOTRACEDBGC3("H245 message needs to be tunneled. "
"(%s, %s)\n", call->callType,
call->callToken);
- ooSendMsg(call, OOH245MSG);
+ if (ooSendMsg(call, OOH245MSG) != OO_OK)
+ break;
+ }
}
}
}
@@ -1330,7 +1334,7 @@ int ooSendMsg(OOH323CallData *call, int type)
{
OOTRACEDBGA3("Warning:Call marked for cleanup. Can not send message."
"(%s, %s)\n", call->callType, call->callToken);
- return OO_OK;
+ return OO_FAILED;
}
if(type == OOQ931MSG)
diff --git a/addons/ooh323c/src/ooh245.c b/addons/ooh323c/src/ooh245.c
index 940b8d838..efb0c21f2 100644
--- a/addons/ooh323c/src/ooh245.c
+++ b/addons/ooh323c/src/ooh245.c
@@ -2126,6 +2126,8 @@ int ooHandleH245Command(OOH323CallData *call,
ooClearAllLogicalChannels(call);
}
ooSendEndSessionCommand(call);
+ if (call->callState < OO_CALL_CLEAR)
+ call->callState = OO_CALL_CLEAR;
}