Minor fix for GSM HR codec negotiation: Add missing 'break'.
[lcr.git] / gsm.cpp
diff --git a/gsm.cpp b/gsm.cpp
index 0a42b14..6063a9b 100644 (file)
--- a/gsm.cpp
+++ b/gsm.cpp
@@ -581,6 +581,7 @@ void Pgsm::modify_lchan(int media_type)
                add_trace("speech", "version", "Half Rate given");
                mode->lchan_mode = 0x01; /* GSM V1 */
                mode->lchan_type = 0x03; /* TCH/H */
+               break;
        default:
                add_trace("speech", "version", "Full Rate given");
                mode->lchan_mode = 0x01; /* GSM V1 */
@@ -838,6 +839,9 @@ void Pgsm::message_notify(unsigned int epoint_id, int message_id, union paramete
 //     printf("if = %d\n", param->notifyinfo.notify);
        if (param->notifyinfo.notify>INFO_NOTIFY_NONE) {
                notify = param->notifyinfo.notify & 0x7f;
+               /* skip all notifiy ids that are not 0, 1, 2 */
+               if (notify > 2)
+                       return;
                if (p_state!=PORT_STATE_CONNECT /*&& p_state!=PORT_STATE_IN_PROCEEDING*/ && p_state!=PORT_STATE_IN_ALERTING) {
                        /* queue notification */
                        if (p_g_notify_pending)
@@ -1057,6 +1061,13 @@ void Pgsm::message_disconnect(unsigned int epoint_id, int message_id, union para
        add_trace("cause", "coding", "%d", mncc->cause.coding);
        add_trace("cause", "location", "%d", mncc->cause.location);
        add_trace("cause", "value", "%d", mncc->cause.value);
+#ifdef WITH_GSM_MS
+       /* special case for BS mode */
+       if (param->disconnectinfo.transfer.result && (p_type & PORT_CLASS_GSM_MASK) == PORT_CLASS_GSM_BS) {
+               ((class Pgsm_bs *)this)->enc_ie_facility_ect(mncc, &param->disconnectinfo.transfer);
+               gsm_trace_facility((unsigned char *)mncc->facility.info, mncc->facility.len);
+       }
+#endif
        end_trace();
        send_and_free_mncc(p_g_lcr_gsm, mncc->msg_type, mncc);