[libpri-commits] rmudgett: branch rmudgett/ect r1615 - /team/rmudgett/ect/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Fri Apr 16 17:15:21 CDT 2010
Author: rmudgett
Date: Fri Apr 16 17:15:19 2010
New Revision: 1615
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1615
Log:
Make PTMP NT ECT more robust.
Add checks to use the awarded device call record in PTMP NT mode. Now any
ECT FACILITY messages sent will be directed to a specific device instead
of broadcasted.
Also eliminated a useless switchtype check.
Modified:
team/rmudgett/ect/pri.c
team/rmudgett/ect/pri_internal.h
team/rmudgett/ect/q931.c
Modified: team/rmudgett/ect/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/ect/pri.c?view=diff&rev=1615&r1=1614&r2=1615
==============================================================================
--- team/rmudgett/ect/pri.c (original)
+++ team/rmudgett/ect/pri.c Fri Apr 16 17:15:19 2010
@@ -1016,15 +1016,27 @@
int pri_channel_bridge(q931_call *call1, q931_call *call2)
{
+ struct q931_call *winner;
+
if (!call1 || !call2)
return -1;
+
+ winner = q931_find_winning_call(call1);
+ if (!winner) {
+ /* Cannot transfer: Call 1 does not have a winner yet. */
+ return -1;
+ }
+ call1 = winner;
+
+ winner = q931_find_winning_call(call2);
+ if (!winner) {
+ /* Cannot transfer: Call 2 does not have a winner yet. */
+ return -1;
+ }
+ call2 = winner;
/* Check to see if we're on the same PRI */
if (call1->pri != call2->pri)
- return -1;
-
- /* Make sure we have compatible switchtypes */
- if (call1->pri->switchtype != call2->pri->switchtype)
return -1;
/* Check for bearer capability */
Modified: team/rmudgett/ect/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/ect/pri_internal.h?view=diff&rev=1615&r1=1614&r2=1615
==============================================================================
--- team/rmudgett/ect/pri_internal.h (original)
+++ team/rmudgett/ect/pri_internal.h Fri Apr 16 17:15:19 2010
@@ -940,6 +940,7 @@
const char *q931_call_state_str(enum Q931_CALL_STATE callstate);
const char *msg2str(int msg);
+struct q931_call *q931_find_winning_call(struct q931_call *call);
int q931_master_pass_event(struct pri *ctrl, struct q931_call *subcall, int msg_type);
struct pri_subcommand *q931_alloc_subcommand(struct pri *ctrl);
Modified: team/rmudgett/ect/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/ect/q931.c?view=diff&rev=1615&r1=1614&r2=1615
==============================================================================
--- team/rmudgett/ect/q931.c (original)
+++ team/rmudgett/ect/q931.c Fri Apr 16 17:15:19 2010
@@ -5118,7 +5118,6 @@
}
/*!
- * \internal
* \brief Find the winning subcall if it exists or current call if not outboundbroadcast.
*
* \param call Starting Q.931 call record of search.
@@ -5126,7 +5125,7 @@
* \retval winning-call or given call if not outboundbroadcast.
* \retval NULL if no winning call yet.
*/
-static struct q931_call *q931_find_winning_call(struct q931_call *call)
+struct q931_call *q931_find_winning_call(struct q931_call *call)
{
struct q931_call *master;
More information about the libpri-commits
mailing list