FreeCalypso > hg > themwi-system-sw
comparison 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 |
comparison
equal
deleted
inserted
replaced
101:ca21fbf9d2ea | 102:d26d97974c8a |
---|---|
134 } | 134 } |
135 | 135 |
136 pstn2gsm_init(ep) | 136 pstn2gsm_init(ep) |
137 struct endpoint *ep; | 137 struct endpoint *ep; |
138 { | 138 { |
139 if (ep->gsm_encoder_state) | |
140 return TMGW_RESP_OK; | |
139 switch (ep->gsm_payload_msg_type) { | 141 switch (ep->gsm_payload_msg_type) { |
140 case GSM_TCHF_FRAME: | 142 case GSM_TCHF_FRAME: |
141 ep->gsm_encoder_state = gsm_create(); | 143 ep->gsm_encoder_state = gsm_create(); |
142 if (!ep->gsm_encoder_state) | 144 if (!ep->gsm_encoder_state) |
143 return TMGW_RESP_ERR_RSRC; | 145 return TMGW_RESP_ERR_RSRC; |