X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=dss1.cpp;h=61c89218e8dacffc6ee240f5236ed3af1974b481;hp=452c775a6a9e17b12de681610316272ab3d85451;hb=7b78740c6e5e4ad585d36c157333b8c5018dcc82;hpb=3754d8f73ff7cb55e204f7ede6569028407a00e5 diff --git a/dss1.cpp b/dss1.cpp index 452c775..61c8921 100644 --- a/dss1.cpp +++ b/dss1.cpp @@ -1785,17 +1785,18 @@ void Pdss1::message_isdn(unsigned long prim, unsigned long dinfo, void *data) switch (prim) { case CC_TIMEOUT | INDICATION: - l1l2l3_trace_header(p_m_mISDNport, this, prim, DIRECTION_IN); if (p_m_d_ntmode) { int headerlen = (p_m_d_ntmode)?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; timer_hex = *((int *)(((char *)data)+headerlen)); } - if (timer_hex) - add_trace("timer", NULL, "%x", timer_hex); - end_trace(); if (timer_hex==0x312 && p_m_d_ntmode) + { + l1l2l3_trace_header(p_m_mISDNport, this, prim, DIRECTION_IN); + add_trace("timer", NULL, "%x", timer_hex); + end_trace(); t312_timeout(prim, dinfo, data); + } break; case CC_SETUP | INDICATION: @@ -2832,20 +2833,8 @@ void Pdss1::message_release(unsigned long epoint_id, int message_id, union param end_trace(); msg_queue_tail(&p_m_mISDNport->downqueue, dmsg); new_state(PORT_STATE_RELEASE); - /* remove epoint */ - remove_endpoint: - free_epointid(epoint_id); - l1l2l3_trace_header(p_m_mISDNport, this, CC_RELEASE_CR | REQUEST, DIRECTION_OUT); - add_trace("callref", "new", "0x%x", p_m_d_l3id); - end_trace(); - if (p_m_d_ntmode) - { - if ((p_m_d_l3id&0xff00) == 0xff00) - p_m_mISDNport->procids[p_m_d_l3id&0xff] = 0; - } - p_m_d_l3id = 0; - p_m_delete = 1; return; + } /* if we are on outgoing/incoming call setup, we may release complete */ if (p_state==PORT_STATE_OUT_SETUP @@ -2862,7 +2851,20 @@ void Pdss1::message_release(unsigned long epoint_id, int message_id, union param end_trace(); msg_queue_tail(&p_m_mISDNport->downqueue, dmsg); new_state(PORT_STATE_RELEASE); - goto remove_endpoint; + + /* remove epoint */ + free_epointid(epoint_id); + l1l2l3_trace_header(p_m_mISDNport, this, CC_RELEASE_CR | REQUEST, DIRECTION_OUT); + add_trace("callref", NULL, "0x%x", p_m_d_l3id); + end_trace(); + if (p_m_d_ntmode) + { + if ((p_m_d_l3id&0xff00) == 0xff00) + p_m_mISDNport->procids[p_m_d_l3id&0xff] = 0; + } + p_m_d_l3id = 0; + p_m_delete = 1; + return; } /* NT-MODE in setup state we must send PROCEEDING first */ @@ -3286,7 +3288,7 @@ int stack2manager_te(struct mISDNport *mISDNport, msg_t *msg) /* creating port object */ SPRINT(name, "%s-%d-in", mISDNport->ifport->interface->name, mISDNport->portnum); - if (!(pdss1 = new Pdss1(PORT_TYPE_DSS1_NT_IN, mISDNport, name, NULL, 0, 0))) + if (!(pdss1 = new Pdss1(PORT_TYPE_DSS1_TE_IN, mISDNport, name, NULL, 0, 0))) { RELEASE_COMPLETE_t *release_complete; msg_t *dmsg;