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.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/20771 )
Change subject: Use osmo_fd_setup() wherever applicable
......................................................................
Use osmo_fd_setup() wherever applicable
Change-Id: Ie093dea96ec8990368695c0c5824e0fe44fb8540
---
M Transceiver52M/device/ipc/ipc-driver-test.c
M Transceiver52M/device/ipc/ipc_chan.c
M Transceiver52M/device/ipc/ipc_sock.c
3 files changed, 3 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/71/20771/1
diff --git a/Transceiver52M/device/ipc/ipc-driver-test.c b/Transceiver52M/device/ipc/ipc-driver-test.c
index 0cccbda..da53463 100644
--- a/Transceiver52M/device/ipc/ipc-driver-test.c
+++ b/Transceiver52M/device/ipc/ipc-driver-test.c
@@ -394,10 +394,7 @@
return -1;
}
- bfd->when = OSMO_FD_READ;
- bfd->cb = sock_callback_fn;
- bfd->data = state;
- bfd->priv_nr = n;
+ osmo_fd_setup(bfd, bfd->fd, OSMO_FD_READ, sock_callback_fn, state, n);
rc = osmo_fd_register(bfd);
if (rc < 0) {
diff --git a/Transceiver52M/device/ipc/ipc_chan.c b/Transceiver52M/device/ipc/ipc_chan.c
index af18aab..50782b9 100644
--- a/Transceiver52M/device/ipc/ipc_chan.c
+++ b/Transceiver52M/device/ipc/ipc_chan.c
@@ -236,13 +236,8 @@
return 0;
}
- conn_bfd->fd = rc;
- conn_bfd->when = OSMO_FD_READ;
- conn_bfd->cb = ipc_chan_sock_cb;
- conn_bfd->data = state;
-
/* copy chan nr, required for proper bfd<->chan # mapping */
- conn_bfd->priv_nr = bfd->priv_nr;
+ osmo_fd_setup(conn_bfd, rc, OSMO_FD_READ, ipc_chan_sock_cb, state, bfd->priv_nr);
if (osmo_fd_register(conn_bfd) != 0) {
LOGP(DDEV, LOGL_ERROR,
diff --git a/Transceiver52M/device/ipc/ipc_sock.c b/Transceiver52M/device/ipc/ipc_sock.c
index 26865bf..b014fac 100644
--- a/Transceiver52M/device/ipc/ipc_sock.c
+++ b/Transceiver52M/device/ipc/ipc_sock.c
@@ -249,10 +249,7 @@
return 0;
}
- conn_bfd->fd = rc;
- conn_bfd->when = OSMO_FD_READ;
- conn_bfd->cb = ipc_sock_cb;
- conn_bfd->data = state;
+ osmo_fd_setup(conn_bfd, rc, OSMO_FD_READ, ipc_sock_cb, state, 0);
if (osmo_fd_register(conn_bfd) != 0) {
LOGP(DDEV, LOGL_ERROR,
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/20771
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ie093dea96ec8990368695c0c5824e0fe44fb8540
Gerrit-Change-Number: 20771
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/7e875e5c/attachment.htm>