[libpri-commits] mattf: branch mattf/libpri-1.4-q921-rewrite r1337 - /team/mattf/libpri-1.4-q9...
SVN commits to the libpri project
libpri-commits at lists.digium.com
Thu Nov 19 14:37:12 CST 2009
Author: mattf
Date: Thu Nov 19 14:37:08 2009
New Revision: 1337
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1337
Log:
Fix problem with trying to do a TEI request on an PRI without the group TEI (non-master). Also, fix potential problem with NT-PTMP MDL layer trying to exercise rights of layer 2 management on TE-PTMP link.
Modified:
team/mattf/libpri-1.4-q921-rewrite/q921.c
Modified: team/mattf/libpri-1.4-q921-rewrite/q921.c
URL: http://svnview.digium.com/svn/libpri/team/mattf/libpri-1.4-q921-rewrite/q921.c?view=diff&rev=1337&r1=1336&r2=1337
==============================================================================
--- team/mattf/libpri-1.4-q921-rewrite/q921.c (original)
+++ team/mattf/libpri-1.4-q921-rewrite/q921.c Thu Nov 19 14:37:08 2009
@@ -146,7 +146,7 @@
return;
}
pri->ri = random() % 65535;
- q921_send_tei(pri, Q921_TEI_IDENTITY_REQUEST, pri->ri, Q921_TEI_GROUP, 1);
+ q921_send_tei(PRI_MASTER(pri), Q921_TEI_IDENTITY_REQUEST, pri->ri, Q921_TEI_GROUP, 1);
pri_schedule_del(pri, pri->t202_timer);
pri->t202_timer = pri_schedule_event(pri, pri->timers[PRI_TIMER_T202], q921_tei_request, pri);
}
@@ -1374,7 +1374,7 @@
if (!BRI_TE_PTMP(pri))
return NULL;
- if (pri->q921_state < Q921_TEI_ASSIGNED)
+ if (pri->subchannel->q921_state < Q921_TEI_ASSIGNED)
return NULL;
/* If it's addressed to the group TEI or to our TEI specifically, we respond */
@@ -1383,7 +1383,6 @@
break;
case Q921_TEI_IDENTITY_REMOVE:
- pri_error(pri, "Fix me\n");
if (!BRI_TE_PTMP(pri))
return NULL;
@@ -2209,12 +2208,13 @@
/* If it's not us, try any subchannels we have */
if (pri->subchannel)
return q921_receive(pri->subchannel, h, len + 2);
- else {
+ else if (BRI_NT_PTMP(pri)) {
/* This means we couldn't find a candidate TEI/subchannel for it...
* Time for some corrective action */
return q921_handle_unmatched_frame(pri, h, len);
- }
+ } else
+ return NULL;
}
if (pri->debug & PRI_DEBUG_Q921_DUMP)
More information about the libpri-commits
mailing list