From eb77a2971b6724adbd855ceb84179446446490bb Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 18 Oct 2020 22:25:26 +0200 Subject: Use osmo_fd_*_{disable,enable} Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d Change-Id: I4e228399d21098cc9a99b9cc1aa42b24ec609159 --- src/ipaccess/abisip-find.c | 4 ++-- src/ipaccess/ipaccess-proxy.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ipaccess') diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c index a414d1615..4bba8a315 100644 --- a/src/ipaccess/abisip-find.c +++ b/src/ipaccess/abisip-find.c @@ -406,7 +406,7 @@ static int bfd_cb(struct osmo_fd *bfd, unsigned int flags) if (flags & OSMO_FD_READ) return read_response(bfd->fd); if (flags & OSMO_FD_WRITE) { - bfd->when &= ~OSMO_FD_WRITE; + osmo_fd_write_disable(bfd); return bcast_find(bfd->fd); } return 0; @@ -418,7 +418,7 @@ static void timer_cb(void *_data) { struct osmo_fd *bfd = _data; - bfd->when |= OSMO_FD_WRITE; + osmo_fd_write_enable(bfd); base_stations_bump(false); diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c index 1ed215db9..47465b4ea 100644 --- a/src/ipaccess/ipaccess-proxy.c +++ b/src/ipaccess/ipaccess-proxy.c @@ -283,7 +283,7 @@ static int handle_udp_read(struct osmo_fd *bfd) if (other_conn) { /* enqueue the message for TX on the respective FD */ msgb_enqueue(&other_conn->tx_queue, msg); - other_conn->fd.when |= OSMO_FD_WRITE; + osmo_fd_write_enable(&other_conn->fd); } else msgb_free(msg); @@ -293,7 +293,7 @@ static int handle_udp_read(struct osmo_fd *bfd) static int handle_udp_write(struct osmo_fd *bfd) { /* not implemented yet */ - bfd->when &= ~OSMO_FD_WRITE; + osmo_fd_write_disable(bfd); return -EIO; } @@ -840,7 +840,7 @@ static int handle_tcp_read(struct osmo_fd *bfd) /* enqueue packet towards BSC */ msgb_enqueue(&bsc_conn->tx_queue, msg); /* mark respective filedescriptor as 'we want to write' */ - bsc_conn->fd.when |= OSMO_FD_WRITE; + osmo_fd_write_enable(&bsc_conn->fd); } else { logp_ipbc_uid(DLINP, LOGL_INFO, ipbc, bfd->priv_nr >> 8); LOGPC(DLINP, LOGL_INFO, "Dropping packet from %s, " @@ -869,7 +869,7 @@ static int handle_tcp_write(struct osmo_fd *bfd) /* get the next msg for this timeslot */ if (llist_empty(&ipc->tx_queue)) { - bfd->when &= ~OSMO_FD_WRITE; + osmo_fd_write_disable(bfd); return 0; } lh = ipc->tx_queue.next; -- cgit v1.2.3