[PATCH] osmo-mgw[master]: conn: remove assertions

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/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Nov 30 08:41:35 UTC 2017


Review at  https://gerrit.osmocom.org/5107

conn: remove assertions

Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0
---
M src/libosmo-mgcp/mgcp_conn.c
1 file changed, 0 insertions(+), 25 deletions(-)


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

diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index ae3f026..4090a9f 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -124,10 +124,6 @@
 	struct mgcp_conn *conn;
 	int rc;
 
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-	OSMO_ASSERT(strlen(name) < sizeof(conn->name));
-
 	/* Do not allow more then two connections */
 	if (llist_count(&endp->conns) >= endp->type->max_conns)
 		return NULL;
@@ -170,11 +166,6 @@
  *  \returns pointer to allocated connection, NULL if not found */
 struct mgcp_conn *mgcp_conn_get(struct mgcp_endpoint *endp, const char *id)
 {
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(id);
-	OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
 	struct mgcp_conn *conn;
 
 	llist_for_each_entry(conn, &endp->conns, entry) {
@@ -192,11 +183,6 @@
 struct mgcp_conn_rtp *mgcp_conn_get_rtp(struct mgcp_endpoint *endp,
 					const char *id)
 {
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(id);
-	OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
 	struct mgcp_conn *conn;
 
 	conn = mgcp_conn_get(endp, id);
@@ -214,11 +200,6 @@
  *  \param[in] id identification number of the connection */
 void mgcp_conn_free(struct mgcp_endpoint *endp, const char *id)
 {
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(id);
-	OSMO_ASSERT(strlen(id) < MGCP_CONN_ID_LENGTH);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
 	struct mgcp_conn *conn;
 
 	conn = mgcp_conn_get(endp, id);
@@ -246,9 +227,6 @@
  *  \param[in] endp associated endpoint */
 void mgcp_conn_free_oldest(struct mgcp_endpoint *endp)
 {
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
 	struct mgcp_conn *conn;
 
 	if (llist_empty(&endp->conns))
@@ -265,9 +243,6 @@
  *  \param[in] endp associated endpoint */
 void mgcp_conn_free_all(struct mgcp_endpoint *endp)
 {
-	OSMO_ASSERT(endp);
-	OSMO_ASSERT(endp->conns.next != NULL && endp->conns.prev != NULL);
-
 	struct mgcp_conn *conn;
 	struct mgcp_conn *conn_tmp;
 

-- 
To view, visit https://gerrit.osmocom.org/5107
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7badc729e97b76701abbce6a73a1ad1e46d3fee0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list