fixed multiplexing bug

DL reports tei

	modified:   dss1.cpp
	modified:   mISDN.cpp
This commit is contained in:
Super User 2008-05-12 11:39:44 +02:00
parent 4a0bc5037a
commit 30a6a1642b
2 changed files with 17 additions and 4 deletions

View File

@ -4058,11 +4058,19 @@ int stack2manager(struct mISDNport *mISDNport, unsigned int cmd, unsigned int pi
{
pdss1 = (class Pdss1 *)port;
/* check out correct stack and id */
if (pdss1->p_m_mISDNport == mISDNport
&& (pdss1->p_m_d_l3id & MISDN_PID_CRVAL_MASK) == (pid & MISDN_PID_CRVAL_MASK))
if (pdss1->p_m_mISDNport == mISDNport)
{
/* found port, the message belongs to */
break;
if (pdss1->p_m_d_l3id & MISDN_PID_CR_FLAG)
{
/* local callref, so match value only */
if ((pdss1->p_m_d_l3id & MISDN_PID_CRVAL_MASK) == (pid & MISDN_PID_CRVAL_MASK))
break; // found
} else
{
/* remote callref, ref + channel id */
if (pdss1->p_m_d_l3id == pid)
break; // found
}
}
}
port = port->next;

View File

@ -2365,6 +2365,7 @@ int mISDN_handler(void)
case MT_L2ESTABLISH:
l1l2l3_trace_header(mISDNport, NULL, L2_ESTABLISH_IND, DIRECTION_IN);
add_trace("tei", NULL, "%d", l3m->pid);
end_trace();
if ((!mISDNport->ntmode || mISDNport->ptp) && l3m->pid < 127)
{
@ -2379,6 +2380,7 @@ int mISDN_handler(void)
case MT_L2RELEASE:
l1l2l3_trace_header(mISDNport, NULL, L2_RELEASE_IND, DIRECTION_IN);
add_trace("tei", NULL, "%d", l3m->pid);
end_trace();
if ((!mISDNport->ntmode || mISDNport->ptp) && l3m->pid < 127)
{
@ -2418,6 +2420,7 @@ int mISDN_handler(void)
PDEBUG(DEBUG_ISDN, "the L2 establish timer expired, we try to establish the link portnum=%d.\n", mISDNport->portnum);
mISDNport->ml3->to_layer3(mISDNport->ml3, MT_L2ESTABLISH, 0, NULL);
l1l2l3_trace_header(mISDNport, NULL, L2_ESTABLISH_REQ, DIRECTION_OUT);
add_trace("tei", NULL, "%d", 0);
end_trace();
time(&mISDNport->l2establish);
return(1);
@ -2557,6 +2560,7 @@ int mISDN_handler(void)
mISDN_write(mISDNdevice, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
}
l1l2l3_trace_header(mISDNport, NULL, L2_ESTABLISH_REQ, DIRECTION_OUT);
add_trace("tei", NULL, "%d", 0);
end_trace();
time(&mISDNport->l2establish);
return(1);
@ -3338,6 +3342,7 @@ struct mISDNport *mISDNport_open(int port, int ptp, int force_nt, int l2hold, st
{
mISDNport->ml3->to_layer3(mISDNport->ml3, MT_L2ESTABLISH, 0, NULL);
l1l2l3_trace_header(mISDNport, NULL, L2_ESTABLISH_REQ, DIRECTION_OUT);
add_trace("tei", NULL, "%d", 0);
end_trace();
time(&mISDNport->l2establish);
}