FreeCalypso > hg > themwi-system-sw
comparison mgw/crcx.c @ 99:738be11ac432
mgw internal code: simplify MDCX error handling
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2022 13:42:46 -0800 |
parents | 020ba624bdd8 |
children | f062c32a5116 |
comparison
equal
deleted
inserted
replaced
98:423610bb2c9e | 99:738be11ac432 |
---|---|
141 free(ep); | 141 free(ep); |
142 resp->res = TMGW_RESP_ERR_RSRC; | 142 resp->res = TMGW_RESP_ERR_RSRC; |
143 return; | 143 return; |
144 } | 144 } |
145 } | 145 } |
146 rc = mdcx_operation(ep, req, resp); | 146 rc = mdcx_operation(ep, req); |
147 if (rc < 0) { | 147 if (rc != TMGW_RESP_OK) { |
148 if (ep->ep_type & TMGW_EP_HAS_GSM_SOCK) | 148 if (ep->ep_type & TMGW_EP_HAS_GSM_SOCK) |
149 free_rtp_end(&ep->rtp_gsm); | 149 free_rtp_end(&ep->rtp_gsm); |
150 if (ep->ep_type & TMGW_EP_HAS_PSTN_SOCK) | 150 if (ep->ep_type & TMGW_EP_HAS_PSTN_SOCK) |
151 free_rtp_end(&ep->rtp_pstn); | 151 free_rtp_end(&ep->rtp_pstn); |
152 free(ep); | 152 free(ep); |
153 resp->res = rc; | |
153 return; | 154 return; |
154 } | 155 } |
155 /* all good - accept the new endpoint and return OK */ | 156 /* all good - accept the new endpoint and return OK */ |
156 ep->next = conn->endp_list; | 157 ep->next = conn->endp_list; |
157 conn->endp_list = ep; | 158 conn->endp_list = ep; |