-#if 0
-/*
- * sending message that were queued during L1 activation
- * or releasing port if link is down
- */
-void setup_queue(struct mISDNport *mISDNport, int link)
-{
- class Port *port;
- class Pdss1 *pdss1;
- struct lcr_msg *message;
-
- if (!mISDNport->ntmode)
- return;
-
- /* check all port objects for pending message */
- port = port_first;
- while(port)
- {
- if ((port->p_type&PORT_CLASS_mISDN_MASK) == PORT_CLASS_mISDN_DSS1)
- {
- pdss1 = (class Pdss1 *)port;
- if (pdss1->p_m_mISDNport == mISDNport)
- {
- if (pdss1->p_m_d_queue)
- {
- if (link)
- {
- PDEBUG(DEBUG_ISDN, "the L1 became active, so we send queued message for portnum=%d (%s).\n", mISDNport->portnum, pdss1->p_name);
- /* LAYER 1 is up, so we send */
- pdss1->message_setup(pdss1->p_m_d_queue->id_from, pdss1->p_m_d_queue->type, &pdss1->p_m_d_queue->param);
- message_free(pdss1->p_m_d_queue);
- pdss1->p_m_d_queue = NULL;
- } else
- {
- PDEBUG(DEBUG_ISDN, "the L1 became NOT active, so we release port for portnum=%d (%s).\n", mISDNport->portnum, pdss1->p_name);
- message = message_create(pdss1->p_serial, pdss1->p_m_d_queue->id_from, PORT_TO_EPOINT, MESSAGE_RELEASE);
- message->param.disconnectinfo.cause = 27;
- message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
- message_put(message);
- pdss1->new_state(PORT_STATE_RELEASE);
- pdss1->p_m_delete = 1;
- }
- }
- }
- }
- port = port->next;
- }
-}
-
-#endif