Minor fix for GSM HR codec negotiation: Add missing 'break'.
[lcr.git] / appbridge.cpp
index b69d47b..aaab09b 100644 (file)
@@ -136,7 +136,6 @@ fail:
        /* create port for interface */
        SPRINT(portname, "%s-%d-out", interface_out->name, 0);
        memset(&port_settings, 0, sizeof(port_settings));
-#ifdef WITH_MISDN
        if (interface_out->remote) {
                struct admin_list       *admin;
                admin = admin_first;
@@ -153,7 +152,6 @@ fail:
                }
                port = new Premote(PORT_TYPE_REMOTE_OUT, portname, &port_settings, interface_out, admin->sock);
        } else
-#endif
 #ifdef WITH_SIP
        if (interface_out->sip) {
                port = new Psip(PORT_TYPE_SIP_OUT, portname, &port_settings, interface_out);
@@ -174,7 +172,6 @@ fail:
 #ifdef WITH_MISDN
                struct mISDNport *mISDNport;
                int channel = 0;
-               int earlyb;
                int mode = B_MODE_TRANSPARENT;
 
                /* hunt for mISDNport and create Port */
@@ -193,8 +190,12 @@ fail:
                        port = ss5_hunt_line(mISDNport);
                else
 #endif
-               port = new Pdss1((mISDNport->ntmode)?PORT_TYPE_DSS1_NT_OUT:PORT_TYPE_DSS1_TE_OUT, mISDNport, portname, &port_settings, channel, mISDNport->ifport->channel_force, mode);
-               earlyb = mISDNport->earlyb;
+#ifdef ISDN_P_FXS_POTS
+               if (mISDNport->pots)
+                       port = new Pfxs(PORT_TYPE_POTS_FXS_OUT, mISDNport, portname, &port_settings, mISDNport->ifport->interface, mode);
+               else
+#endif
+                       port = new Pdss1((mISDNport->ntmode)?PORT_TYPE_DSS1_NT_OUT:PORT_TYPE_DSS1_TE_OUT, mISDNport, portname, &port_settings, mISDNport->ifport->interface, channel, mISDNport->ifport->channel_force, mode);
 #else
                trace_header("INTERFACE (has no function)", DIRECTION_NONE);
                add_trace("interface", NULL, "%s", ifname);