+ * timeout trigger
+ */
+void Pss5::register_timeout(void)
+{
+ ss5_trace_header(p_m_mISDNport, this, SS5_TIMEOUT_IND, p_m_b_channel);
+ end_trace();
+ switch(p_state) {
+ case PORT_STATE_IN_SETUP:
+ PDEBUG(DEBUG_SS5, "%s: timeout after seize\n", p_name);
+ do_release(CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, SS5_CLEAR_BACK_REQ);
+ break;
+ case PORT_STATE_IN_OVERLAP:
+ PDEBUG(DEBUG_SS5, "%s: timeout during dialing\n", p_name);
+ do_release(CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, SS5_CLEAR_BACK_REQ);
+ break;
+ case PORT_STATE_OUT_DISCONNECT:
+ PDEBUG(DEBUG_SS5, "%s: timeout after sending busy flash / clear forward\n", p_name);
+ /* always send clear forward, because release guard only works as a reply to clear forward */
+ do_release(CAUSE_UNSPECIFIED, LOCATION_PRIVATE_LOCAL, SS5_CLEAR_FORWARD_REQ);
+ break;
+ }
+}
+
+/*
+ * change port state
+ */
+void Pss5::new_state(int state)
+{
+ switch(state) {
+ case PORT_STATE_IN_SETUP:
+ case PORT_STATE_IN_OVERLAP:
+ if (SS5_TIMER_OVERLAP == 0)
+ break;
+ PDEBUG(DEBUG_SS5, "%s: starting timeout timer with %d seconds\n", p_name, SS5_TIMER_OVERLAP);
+ schedule_timer(&p_m_s_timer, SS5_TIMER_OVERLAP, 0);
+ break;
+ case PORT_STATE_OUT_DISCONNECT:
+ if (p_type != PORT_TYPE_SS5_IN)
+ break;
+ if (SS5_TIMER_RELEASE == 0)
+ break;
+ PDEBUG(DEBUG_SS5, "%s: starting timeout timer with %d seconds\n", p_name, SS5_TIMER_RELEASE);
+ schedule_timer(&p_m_s_timer, SS5_TIMER_RELEASE, 0);
+ break;
+ default:
+ PDEBUG(DEBUG_SS5, "%s: stopping timeout timer\n", p_name);
+ unsched_timer(&p_m_s_timer);
+ }
+ Port::new_state(state);
+}
+
+/*