Change in osmo-mgw[master]: mgcp_client: Deprecate unused IPv4-only API

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Sep 2 15:25:18 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19946 )


Change subject: mgcp_client: Deprecate unused IPv4-only API
......................................................................

mgcp_client: Deprecate unused IPv4-only API

The API and related implementation fields are not used internally nor
externally, and only support IPv4. Let's simply deprecate the API and
drop all the uneeded implementation.

Change-Id: I905d4c4efabb6b4a4bc5c02e956808777243cadc
---
M include/osmocom/mgcp_client/mgcp_client.h
M include/osmocom/mgcp_client/mgcp_client_internal.h
M src/libosmo-mgcp-client/mgcp_client.c
3 files changed, 4 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/46/19946/1

diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h
index b5a3529..02996a7 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -133,7 +133,7 @@
 
 const char *mgcp_client_remote_addr_str(struct mgcp_client *mgcp);
 uint16_t mgcp_client_remote_port(struct mgcp_client *mgcp);
-uint32_t mgcp_client_remote_addr_n(struct mgcp_client *mgcp);
+uint32_t mgcp_client_remote_addr_n(struct mgcp_client *mgcp) OSMO_DEPRECATED("deprecated, returns 0");
 
 const char *mgcp_client_endpoint_domain(const struct mgcp_client *mgcp);
 const char *mgcp_client_rtpbridge_wildcard(const struct mgcp_client *mgcp);
diff --git a/include/osmocom/mgcp_client/mgcp_client_internal.h b/include/osmocom/mgcp_client/mgcp_client_internal.h
index 690a4af..b4b3b02 100644
--- a/include/osmocom/mgcp_client/mgcp_client_internal.h
+++ b/include/osmocom/mgcp_client/mgcp_client_internal.h
@@ -6,7 +6,6 @@
 
 struct mgcp_client {
 	struct mgcp_client_conf actual;
-	uint32_t remote_addr;
 	struct osmo_wqueue wq;
 	mgcp_trans_id_t next_trans_id;
 	struct llist_head responses_pending;
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 72068b4..5972803 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -823,7 +823,6 @@
  *  \returns 0 on success, -EINVAL on error. */
 int mgcp_client_connect(struct mgcp_client *mgcp)
 {
-	struct sockaddr_in addr;
 	struct osmo_wqueue *wq;
 	int rc;
 
@@ -843,9 +842,6 @@
 		goto error_close_fd;
 	}
 
-	inet_aton(mgcp->actual.remote_addr, &addr.sin_addr);
-	mgcp->remote_addr = htonl(addr.sin_addr.s_addr);
-
 	osmo_wqueue_init(wq, 1024);
 	wq->bfd.when = OSMO_FD_READ;
 	wq->bfd.data = mgcp;
@@ -877,12 +873,13 @@
 	return mgcp->actual.remote_port;
 }
 
-/*! Get the IP-Aaddress of the associated MGW as its numeric representation.
+/*! Get the IP-Address of the associated MGW as its numeric representation.
+ *  DEPRECATED, DON'T USE.
  *  \param[in] mgcp MGCP client descriptor.
  *  \returns IP-Address as 32 bit integer (network byte order) */
 uint32_t mgcp_client_remote_addr_n(struct mgcp_client *mgcp)
 {
-	return mgcp->remote_addr;
+	return 0;
 }
 
 /* To compose endpoint names, usually for CRCX, use this as domain name.

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19946
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I905d4c4efabb6b4a4bc5c02e956808777243cadc
Gerrit-Change-Number: 19946
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200902/2b94b107/attachment.htm>


More information about the gerrit-log mailing list