- case MS_NEW:
- PDEBUG(DEBUG_GSM, "MS %s comes available\n", ms->name);
- return 0;
- case MS_DELETE:
- PDEBUG(DEBUG_GSM, "MS %s is removed\n", ms->name);
- port = port_first;
- while(port) {
- if ((port->p_type & PORT_CLASS_GSM_MASK) == PORT_CLASS_GSM_MS) {
- pgsm_ms = (class Pgsm_ms *)port;
- if (pgsm_ms->p_m_g_instance == ms) {
- struct lcr_msg *message;
-
- pgsm_ms->p_m_g_instance = 0;
- message = message_create(pgsm_ms->p_serial, ACTIVE_EPOINT(pgsm_ms->p_epointlist), PORT_TO_EPOINT, MESSAGE_RELEASE);
- message->param.disconnectinfo.cause = 27;
- message->param.disconnectinfo.location = LOCATION_PRIVATE_LOCAL;
- message_put(message);
- pgsm_ms->new_state(PORT_STATE_RELEASE);
- trigger_work(&pgsm_ms->p_m_g_delete);
- }
- }
- port = port->next;
- }
- return 0;