- /* note: pri is a special case, because links must be up for pri */
- if (p_m_mISDNport->l1link || p_m_mISDNport->pri || !p_m_mISDNport->ntmode || p_state!=PORT_STATE_IDLE)
- {
- /* LAYER 1 is up, or we may send */
- message_setup(epoint_id, message_id, param);
- } else {
- iframe_t act;
- /* LAYER 1 id down, so we queue */
- p_m_d_queue = message_create(epoint_id, p_serial, EPOINT_TO_PORT, message_id);
- memcpy(&p_m_d_queue->param, param, sizeof(union parameter));
- /* attach us */
- if (!(epointlist_new(epoint_id)))
- FATAL("No memory for epointlist\n");
- /* activate link */
- PDEBUG(DEBUG_ISDN, "the L1 is down, we try to establish the link NT portnum=%d (%s).\n", p_m_mISDNport->portnum, p_name);
- act.prim = PH_ACTIVATE | REQUEST;
- act.addr = p_m_mISDNport->upper_id | FLG_MSG_DOWN;
- act.dinfo = 0;
- act.len = 0;
- mISDN_write(mISDNdevice, &act, mISDN_HEADER_LEN+act.len, TIMEOUT_1SEC);
- l1l2l3_trace_header(p_m_mISDNport, this, act.prim, DIRECTION_OUT);
- end_trace();
-// /* set timeout */
-// p_m_mISDNport->l1timeout = now+3;
- }