daniel has uploaded this change for review.

View Change

stream_srv: Make osmo_stream_srv_clear_tx_queue() aware of osmo_io

Change-Id: I818fe4e3792ed88ae4d6fd6afb677b39264ab662
---
M src/stream_srv.c
1 file changed, 22 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/76/34576/1
diff --git a/src/stream_srv.c b/src/stream_srv.c
index ca22e1b..dea6f3e 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -957,8 +957,19 @@

void osmo_stream_srv_clear_tx_queue(struct osmo_stream_srv *conn)
{
- msgb_queue_free(&conn->tx_queue);
- osmo_fd_write_disable(&conn->ofd);
+ switch (conn->mode) {
+ case OSMO_STREAM_MODE_OSMO_FD:
+ msgb_queue_free(&conn->tx_queue);
+ osmo_fd_write_disable(&conn->ofd);
+ break;
+ case OSMO_STREAM_MODE_OSMO_IO:
+ osmo_iofd_txqueue_clear(conn->iofd);
+ break;
+ case OSMO_STREAM_MODE_UNKNOWN:
+ default:
+ break;
+ }
+
if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY)
osmo_stream_srv_destroy(conn);
}

To view, visit change 34576. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I818fe4e3792ed88ae4d6fd6afb677b39264ab662
Gerrit-Change-Number: 34576
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann@sysmocom.de>
Gerrit-MessageType: newchange