- if (port)
- if (!portlist_new(port_id, port->p_type))
- {
- PERROR("no mem for portlist, exitting...\n");
- exit(-1);
+ if (port) {
+#ifdef WITH_MISDN
+ if ((port->p_type&PORT_CLASS_MASK) == PORT_CLASS_mISDN)
+ earlyb = ((class PmISDN *)port)->p_m_mISDNport->earlyb;
+#else
+ earlyb = 0;
+#endif
+ if (!portlist_new(port_id, port->p_type, earlyb))
+ FATAL("No memory for portlist.\n");