changeset 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 ca21fbf9d2ea
children 3b3f07b112f3
files mgw/pstn2gsm.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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();