From 1688699c3f1272335132c9113bfd2337b39279af Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Mar 2019 10:26:39 +0100 Subject: select: Rename BSC_FD_* constants to OSMO_FD_* The naming of these constants dates back to when the code was private within OpenBSC. Everything else was renamed (bsc_fd -> osmo_fd) at the time, but somehow the BSC_FD_* defines have been missed at the time. Keep compatibility #defines around, but allow us to migrate the applications to a less confusing naming meanwhile. Change-Id: Ifae33ed61a7cf0ae54ad487399e7dd2489986436 --- src/vty/telnet_interface.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/vty') diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index e090e17e..dc23b12a 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -59,7 +59,7 @@ static void *tall_telnet_ctx; static int telnet_new_connection(struct osmo_fd *fd, unsigned int what); static struct osmo_fd server_socket = { - .when = BSC_FD_READ, + .when = OSMO_FD_READ, .cb = telnet_new_connection, .priv_nr = 0, }; @@ -142,8 +142,8 @@ static int client_data(struct osmo_fd *fd, unsigned int what) struct telnet_connection *conn = fd->data; int rc = 0; - if (what & BSC_FD_READ) { - conn->fd.when &= ~BSC_FD_READ; + if (what & OSMO_FD_READ) { + conn->fd.when &= ~OSMO_FD_READ; rc = vty_read(conn->vty); } @@ -151,10 +151,10 @@ static int client_data(struct osmo_fd *fd, unsigned int what) if (rc == -EBADF) return rc; - if (what & BSC_FD_WRITE) { + if (what & OSMO_FD_WRITE) { rc = buffer_flush_all(conn->vty->obuf, fd->fd); if (rc == BUFFER_EMPTY) - conn->fd.when &= ~BSC_FD_WRITE; + conn->fd.when &= ~OSMO_FD_WRITE; } return rc; @@ -177,7 +177,7 @@ static int telnet_new_connection(struct osmo_fd *fd, unsigned int what) connection->priv = fd->data; connection->fd.data = connection; connection->fd.fd = new_connection; - connection->fd.when = BSC_FD_READ; + connection->fd.when = OSMO_FD_READ; connection->fd.cb = client_data; rc = osmo_fd_register(&connection->fd); if (rc < 0) { @@ -219,10 +219,10 @@ void vty_event(enum event event, int sock, struct vty *vty) switch (event) { case VTY_READ: - bfd->when |= BSC_FD_READ; + bfd->when |= OSMO_FD_READ; break; case VTY_WRITE: - bfd->when |= BSC_FD_WRITE; + bfd->when |= OSMO_FD_WRITE; break; case VTY_CLOSED: /* vty layer is about to free() vty */ -- cgit v1.2.3