summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/mobile
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-10-18 22:43:05 +0200
committerHarald Welte <laforge@osmocom.org>2020-10-18 22:43:05 +0200
commit508d8523c042fc766d2eda61ac47b253660e9c5a (patch)
tree5c58badeec214bc12ac0e742d4b9895906371755 /src/host/layer23/src/mobile
parent39264cc3a824fc10624e9e77ed8dce034873bd53 (diff)
Use OSMO_FD_* instead of deprecated BSC_FD_*
Diffstat (limited to 'src/host/layer23/src/mobile')
-rw-r--r--src/host/layer23/src/mobile/mncc_sock.c18
-rw-r--r--src/host/layer23/src/mobile/script_lua.c2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c
index 48221905..db76ef64 100644
--- a/src/host/layer23/src/mobile/mncc_sock.c
+++ b/src/host/layer23/src/mobile/mncc_sock.c
@@ -72,13 +72,13 @@ int mncc_sock_from_cc(struct mncc_sock_state *state, struct msgb *msg)
/* Actually enqueue the message and mark socket write need */
msgb_enqueue(&state->upqueue, msg);
- state->conn_bfd.when |= BSC_FD_WRITE;
+ state->conn_bfd.when |= OSMO_FD_WRITE;
return 0;
}
void mncc_sock_write_pending(struct mncc_sock_state *state)
{
- state->conn_bfd.when |= BSC_FD_WRITE;
+ state->conn_bfd.when |= OSMO_FD_WRITE;
}
static void mncc_sock_close(struct mncc_sock_state *state)
@@ -92,7 +92,7 @@ static void mncc_sock_close(struct mncc_sock_state *state)
osmo_fd_unregister(bfd);
/* re-enable the generation of ACCEPT for new connections */
- state->listen_bfd.when |= BSC_FD_READ;
+ state->listen_bfd.when |= OSMO_FD_READ;
/* FIXME: make sure we don't enqueue anymore */
@@ -156,7 +156,7 @@ static int mncc_sock_write(struct osmo_fd *bfd)
msg = llist_entry(state->upqueue.next, struct msgb, list);
mncc_prim = (struct gsm_mncc *)msg->data;
- bfd->when &= ~BSC_FD_WRITE;
+ bfd->when &= ~OSMO_FD_WRITE;
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
if (!msgb_length(msg)) {
@@ -171,7 +171,7 @@ static int mncc_sock_write(struct osmo_fd *bfd)
goto close;
if (rc < 0) {
if (errno == EAGAIN) {
- bfd->when |= BSC_FD_WRITE;
+ bfd->when |= OSMO_FD_WRITE;
break;
}
goto close;
@@ -195,12 +195,12 @@ static int mncc_sock_cb(struct osmo_fd *bfd, unsigned int flags)
{
int rc = 0;
- if (flags & BSC_FD_READ)
+ if (flags & OSMO_FD_READ)
rc = mncc_sock_read(bfd);
if (rc < 0)
return rc;
- if (flags & BSC_FD_WRITE)
+ if (flags & OSMO_FD_WRITE)
rc = mncc_sock_write(bfd);
return rc;
@@ -226,13 +226,13 @@ static int mncc_sock_accept(struct osmo_fd *bfd, unsigned int flags)
LOGP(DMNCC, LOGL_NOTICE, "MNCC app connects but we already have "
"another active connection ?!?\n");
/* We already have one MNCC app connected, this is all we support */
- state->listen_bfd.when &= ~BSC_FD_READ;
+ state->listen_bfd.when &= ~OSMO_FD_READ;
close(rc);
return 0;
}
conn_bfd->fd = rc;
- conn_bfd->when = BSC_FD_READ;
+ conn_bfd->when = OSMO_FD_READ;
conn_bfd->cb = mncc_sock_cb;
conn_bfd->data = state;
diff --git a/src/host/layer23/src/mobile/script_lua.c b/src/host/layer23/src/mobile/script_lua.c
index c8868b54..269c9dff 100644
--- a/src/host/layer23/src/mobile/script_lua.c
+++ b/src/host/layer23/src/mobile/script_lua.c
@@ -512,7 +512,7 @@ static int lua_register_fd(lua_State *L)
/* Set the filedescriptor */
fdu->fd.fd = (int) lua_tonumber(L, -3);
fdu->fd.cb = lua_fd_cb;
- fdu->fd.when = BSC_FD_READ;
+ fdu->fd.when = OSMO_FD_READ;
fdu->fd.data = fdu;
/* Assuming that an error here will lead to a GC */