[S] Change in libosmocore[master]: osmo_io: Fix write_enable handling in iofd_txqueue
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33536 ) Change subject: osmo_io: Fix write_enable handling in iofd_txqueue ...................................................................... osmo_io: Fix write_enable handling in iofd_txqueue Enable write on first message in both iofd_txqueue_enqueue{,_front}(), but only if the iofd is not closed. Change-Id: I75827491bb9fe0c6d1e4a195ac434f049b1a6ba6 --- M src/core/osmo_io.c 1 file changed, 16 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c index 253dfa2..4cef142 100644 --- a/src/core/osmo_io.c +++ b/src/core/osmo_io.c @@ -171,7 +171,7 @@ llist_add_tail(&msghdr->list, &iofd->tx_queue.msg_queue); iofd->tx_queue.current_length++; - if (iofd->tx_queue.current_length == 1) + if (iofd->tx_queue.current_length == 1 && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED)) osmo_iofd_ops.write_enable(iofd); return 0; @@ -188,6 +188,9 @@ { llist_add(&msghdr->list, &iofd->tx_queue.msg_queue); iofd->tx_queue.current_length++; + + if (iofd->tx_queue.current_length == 1 && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED)) + osmo_iofd_ops.write_enable(iofd); } /*! Dequeue a message from the front -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33536 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I75827491bb9fe0c6d1e4a195ac434f049b1a6ba6 Gerrit-Change-Number: 33536 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
daniel