diff mgw/pstn2gsm.c @ 102:d26d97974c8a

mgw p2g init: fix bug in forwarding re-enable scenario
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Sep 2022 18:50:58 -0800
parents 1579ec0e9fb9
children f062c32a5116
line wrap: on
line diff
--- a/mgw/pstn2gsm.c	Mon Sep 26 15:21:05 2022 -0800
+++ b/mgw/pstn2gsm.c	Mon Sep 26 18:50:58 2022 -0800
@@ -136,6 +136,8 @@
 pstn2gsm_init(ep)
 	struct endpoint *ep;
 {
+	if (ep->gsm_encoder_state)
+		return TMGW_RESP_OK;
 	switch (ep->gsm_payload_msg_type) {
 	case GSM_TCHF_FRAME:
 		ep->gsm_encoder_state = gsm_create();