pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-mgw/+/39181?usp=email )
Change subject: mgw: Drop own MGCP extension 'noanswer'
......................................................................
mgw: Drop own MGCP extension 'noanswer'
This was added in e3d16bb77530f2b3f08fdaf9640dd98bd9e730fa 14 years ago:
"""
[mgcp] Protocol extension to not generate answers.
For the NAT we want to send requests in a send and forget
way and we are not interested in seeing the answers, so tell
the gateway to not answer them.
"""
So this code is most probably related to osmo-bsc_mgcp time, and we
don't really need this feature in osmo-mgw, it really makes no sense.
Drop it.
Change-Id: Ica2d3d54cda41e0c6416913ab056843a0cd80c17
---
M src/libosmo-mgcp/mgcp_protocol.c
1 file changed, 0 insertions(+), 20 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 16dee03..2f16794 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -1142,7 +1142,6 @@
struct rate_ctr_group *rate_ctrs;
char new_local_addr[INET6_ADDRSTRLEN];
int error_code = 500;
- int silent = 0;
int have_sdp = 0;
char *line;
const char *local_options = NULL;
@@ -1207,9 +1206,6 @@
case 'M':
mode = (const char *)line + 3;
break;
- case 'Z':
- silent = strcasecmp("noanswer", line + 3) == 0;
- break;
case 'X':
if (strncasecmp("Osmux: ", line + 2, strlen("Osmux: ")) == 0) {
/* If osmux is disabled, just skip setting it up */
@@ -1345,8 +1341,6 @@
send_dummy(endp, conn);
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_MDCX_SUCCESS));
- if (silent)
- goto out_silent;
LOGPCONN(conn->conn, DLMGCP, LOGL_NOTICE,
"MDCX: connection successfully modified\n");
@@ -1354,10 +1348,6 @@
return create_response_with_sdp(endp, conn, "MDCX", pdata->trans, false,
false);
error3:
return create_err_response(endp, endp, error_code, "MDCX", pdata->trans);
-
-out_silent:
- LOGPENDP(endp, DLMGCP, LOGL_DEBUG, "MDCX: silent exit\n");
- return NULL;
}
/* DLCX command handler, processes the received command */
@@ -1368,7 +1358,6 @@
struct mgcp_endpoint *endp = rq->endp;
struct rate_ctr_group *rate_ctrs;
int error_code = 400;
- int silent = 0;
char *line;
char stats[1048];
const char *conn_id = NULL;
@@ -1452,9 +1441,6 @@
goto error3;
}
break;
- case 'Z':
- silent = strcasecmp("noanswer", line + 3) == 0;
- break;
default:
LOGPEPTR(endp, trunk, DLMGCP, LOGL_NOTICE, "DLCX: Unhandled MGCP option:
'%c'/%d\n",
line[0], line[0]);
@@ -1513,16 +1499,10 @@
}
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_DLCX_SUCCESS));
- if (silent)
- goto out_silent;
return create_ok_resp_with_param(endp, endp, 250, "DLCX", pdata->trans,
stats);
error3:
return create_err_response(endp, endp, error_code, "DLCX", pdata->trans);
-
-out_silent:
- LOGPENDP(endp, DLMGCP, LOGL_DEBUG, "DLCX: silent exit\n");
- return NULL;
}
/* RSIP command handler, processes the received command */
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/39181?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ica2d3d54cda41e0c6416913ab056843a0cd80c17
Gerrit-Change-Number: 39181
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>