aboutsummaryrefslogtreecommitdiffstats
path: root/src/datagram.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datagram.c')
-rw-r--r--src/datagram.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/datagram.c b/src/datagram.c
index d2233d5..4bc7bed 100644
--- a/src/datagram.c
+++ b/src/datagram.c
@@ -135,11 +135,7 @@ struct osmo_dgram_tx *osmo_dgram_tx_create(void *ctx)
if (!conn)
return NULL;
- conn->ofd.fd = -1;
- conn->ofd.when |= OSMO_FD_READ;
- conn->ofd.priv_nr = 0; /* XXX */
- conn->ofd.cb = osmo_dgram_tx_fd_cb;
- conn->ofd.data = conn;
+ osmo_fd_setup(&conn->ofd, -1, OSMO_FD_READ, osmo_dgram_tx_fd_cb, conn, 0);
INIT_LLIST_HEAD(&conn->tx_queue);
return conn;
@@ -309,10 +305,7 @@ struct osmo_dgram_rx *osmo_dgram_rx_create(void *ctx)
if (!conn)
return NULL;
- conn->ofd.fd = -1;
- conn->ofd.when |= OSMO_FD_READ;
- conn->ofd.cb = osmo_dgram_rx_cb;
- conn->ofd.data = conn;
+ osmo_fd_setup(&conn->ofd, -1, OSMO_FD_READ, osmo_dgram_rx_cb, conn, 0);
return conn;
}