Change in osmo-msc[master]: Use osmo_fd_*_{disable,enable}

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

laforge gerrit-no-reply at lists.osmocom.org
Mon Oct 19 11:14:04 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/20785 )


Change subject: Use osmo_fd_*_{disable,enable}
......................................................................

Use osmo_fd_*_{disable,enable}

Change-Id: I5208124e08d3b403492fe83acee235e61e423450
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
---
M TODO-RELEASE
M src/libmsc/mncc_sock.c
2 files changed, 7 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/85/20785/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index fdddbc2..9c358ae 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,4 @@
 manual				needs common chapter cs7-config.adoc, vty_cpu_sched.adoc from osmo-gsm-manuals > 0.3.0
 osmo-msc	Mobile Identity Coding	OsmoMSC is stricter in rejecting invalid coding of Mobile Identity IEs
 libmosmo-mgcp-client		needs osmo-mgw.git > 1.7.0 (8667d5169df8d06e10ee3f3104e4cd533d15ac57), ABI break due to struct size in mgcp_conn_peer and mgcp_response
+osmo-msc			update version dependency to version with osmo_fd_*_{disable,enable}
diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c
index 4c1362d..b76855f 100644
--- a/src/libmsc/mncc_sock.c
+++ b/src/libmsc/mncc_sock.c
@@ -65,7 +65,7 @@
 
 	/* Actually enqueue the message and mark socket write need */
 	msgb_enqueue(&net->upqueue, msg);
-	net->mncc_state->conn_bfd.when |= OSMO_FD_WRITE;
+	osmo_fd_write_enable(&net->mncc_state->conn_bfd);
 	return 0;
 }
 
@@ -80,7 +80,7 @@
 	osmo_fd_unregister(bfd);
 
 	/* re-enable the generation of ACCEPT for new connections */
-	state->listen_bfd.when |= OSMO_FD_READ;
+	osmo_fd_read_enable(&state->listen_bfd);
 
 	/* release all existing calls */
 	gsm0408_clear_all_trans(state->net, TRANS_CC);
@@ -146,7 +146,7 @@
 		msg = llist_entry(net->upqueue.next, struct msgb, list);
 		mncc_prim = (struct gsm_mncc *)msg->data;
 
-		bfd->when &= ~OSMO_FD_WRITE;
+		osmo_fd_write_disable(bfd);
 
 		/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
 		if (!msgb_length(msg)) {
@@ -161,7 +161,7 @@
 			goto close;
 		if (rc < 0) {
 			if (errno == EAGAIN) {
-				bfd->when |= OSMO_FD_WRITE;
+				osmo_fd_write_enable(bfd);
 				break;
 			}
 			goto close;
@@ -222,7 +222,7 @@
 	hello->lchan_type_offset = offsetof(struct gsm_mncc, lchan_type);
 
 	msgb_enqueue(&mncc->net->upqueue, msg);
-	mncc->conn_bfd.when |= OSMO_FD_WRITE;
+	osmo_fd_write_enable(&mncc->conn_bfd);
 }
 
 /* accept a new connection */
@@ -245,7 +245,7 @@
 		LOGP(DMNCC, LOGL_NOTICE, "MNCC app connects but we already have "
 			"another active connection ?!?\n");
 		/* We already have one MNCC app connected, this is all we support */
-		state->listen_bfd.when &= ~OSMO_FD_READ;
+		osmo_fd_read_disable(&state->listen_bfd);
 		close(rc);
 		return 0;
 	}

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I5208124e08d3b403492fe83acee235e61e423450
Gerrit-Change-Number: 20785
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201019/ece0192e/attachment.htm>


More information about the gerrit-log mailing list