Use osmo_fd_*_{disable,enable}

Change-Id: I16563a1033ad12a32104bfee974045ac4302bc74
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d
This commit is contained in:
Harald Welte 2020-10-19 12:59:13 +02:00 committed by laforge
parent cb98894eb1
commit 2bbdf2e3d7
2 changed files with 4 additions and 3 deletions

View File

@ -8,3 +8,4 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
osmo-pcu update osmo-gsm-manuals dependency to > 0.3.0 for vty_cpu_sched.adoc include
osmo-pcu update libosmocore dependency > 1.4.x for osmo_fd_{read,write}_{enable,disable}

View File

@ -82,7 +82,7 @@ int pcu_sock_send(struct msgb *msg)
return -EIO;
}
msgb_enqueue(&pcu_sock_state.upqueue, msg);
conn_bfd->when |= OSMO_FD_WRITE;
osmo_fd_write_enable(conn_bfd);
return 0;
}
@ -153,7 +153,7 @@ static int pcu_sock_write(struct osmo_fd *bfd)
msg = llist_entry(pcu_sock_state.upqueue.next, struct msgb, list);
pcu_prim = (struct gsm_pcu_if *)msg->data;
bfd->when &= ~OSMO_FD_WRITE;
osmo_fd_write_disable(bfd);
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
if (!msgb_length(msg)) {
@ -168,7 +168,7 @@ static int pcu_sock_write(struct osmo_fd *bfd)
goto close;
if (rc < 0) {
if (errno == EAGAIN) {
bfd->when |= OSMO_FD_WRITE;
osmo_fd_write_enable(bfd);
break;
}
goto close;