aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-09 19:18:06 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-09 19:18:06 +0200
commitdb9ea55c6e0ccd7fd55be9fed692f20876f5f2a9 (patch)
tree84cf3a7fa98feedb7b185e38bfd17ef3aae7f8f1
parente6bca376aa6b84e70a9eeb0e2cfce71491233506 (diff)
Use OSMO_FD_* instead of deprecated BSC_FD_*
New define is available since libosmocore 1.1.0, and we already require 1.3.0, so no need to update dependenices. Let's change it to avoid people re-using old BSC_FD_* symbols when copy-pasting somewhere else. Change-Id: Ida8fd3bd7347163567acde34ad67aefee913b0ea
-rw-r--r--src/osmo-bts-litecell15/lc15_l1_hw.c4
-rw-r--r--src/osmo-bts-oc2g/oc2g_l1_hw.c4
-rw-r--r--src/osmo-bts-sysmo/sysmo_l1_fwd.c2
-rw-r--r--src/osmo-bts-sysmo/sysmo_l1_hw.c4
-rw-r--r--src/osmobts_sock.cpp10
5 files changed, 12 insertions, 12 deletions
diff --git a/src/osmo-bts-litecell15/lc15_l1_hw.c b/src/osmo-bts-litecell15/lc15_l1_hw.c
index 051dc5c..41dd72d 100644
--- a/src/osmo-bts-litecell15/lc15_l1_hw.c
+++ b/src/osmo-bts-litecell15/lc15_l1_hw.c
@@ -157,7 +157,7 @@ int l1if_transport_open(int q, struct lc15l1_hdl *hdl)
read_ofd->priv_nr = q;
read_ofd->data = hdl;
read_ofd->cb = l1if_fd_cb;
- read_ofd->when = BSC_FD_READ;
+ read_ofd->when = OSMO_FD_READ;
rc = osmo_fd_register(read_ofd);
if (rc < 0) {
close(read_ofd->fd);
@@ -179,7 +179,7 @@ int l1if_transport_open(int q, struct lc15l1_hdl *hdl)
write_ofd->fd = rc;
write_ofd->priv_nr = q;
write_ofd->data = hdl;
- write_ofd->when = BSC_FD_WRITE;
+ write_ofd->when = OSMO_FD_WRITE;
rc = osmo_fd_register(write_ofd);
if (rc < 0) {
close(write_ofd->fd);
diff --git a/src/osmo-bts-oc2g/oc2g_l1_hw.c b/src/osmo-bts-oc2g/oc2g_l1_hw.c
index e96df89..b23282a 100644
--- a/src/osmo-bts-oc2g/oc2g_l1_hw.c
+++ b/src/osmo-bts-oc2g/oc2g_l1_hw.c
@@ -157,7 +157,7 @@ int l1if_transport_open(int q, struct oc2gl1_hdl *hdl)
read_ofd->priv_nr = q;
read_ofd->data = hdl;
read_ofd->cb = l1if_fd_cb;
- read_ofd->when = BSC_FD_READ;
+ read_ofd->when = OSMO_FD_READ;
rc = osmo_fd_register(read_ofd);
if (rc < 0) {
close(read_ofd->fd);
@@ -179,7 +179,7 @@ int l1if_transport_open(int q, struct oc2gl1_hdl *hdl)
write_ofd->fd = rc;
write_ofd->priv_nr = q;
write_ofd->data = hdl;
- write_ofd->when = BSC_FD_WRITE;
+ write_ofd->when = OSMO_FD_WRITE;
rc = osmo_fd_register(write_ofd);
if (rc < 0) {
close(write_ofd->fd);
diff --git a/src/osmo-bts-sysmo/sysmo_l1_fwd.c b/src/osmo-bts-sysmo/sysmo_l1_fwd.c
index 535a7f0..cfb2b95 100644
--- a/src/osmo-bts-sysmo/sysmo_l1_fwd.c
+++ b/src/osmo-bts-sysmo/sysmo_l1_fwd.c
@@ -121,7 +121,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *fl1h)
ofd->data = fl1h;
ofd->priv_nr = q;
- ofd->when |= BSC_FD_READ;
+ ofd->when |= OSMO_FD_READ;
rc = osmo_sock_init_ofd(ofd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP,
bts_host, fwd_udp_ports[q],
diff --git a/src/osmo-bts-sysmo/sysmo_l1_hw.c b/src/osmo-bts-sysmo/sysmo_l1_hw.c
index 8351d68..a67e875 100644
--- a/src/osmo-bts-sysmo/sysmo_l1_hw.c
+++ b/src/osmo-bts-sysmo/sysmo_l1_hw.c
@@ -163,7 +163,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *hdl)
read_ofd->priv_nr = q;
read_ofd->data = hdl;
read_ofd->cb = l1if_fd_cb;
- read_ofd->when = BSC_FD_READ;
+ read_ofd->when = OSMO_FD_READ;
rc = osmo_fd_register(read_ofd);
if (rc < 0) {
close(read_ofd->fd);
@@ -182,7 +182,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *hdl)
write_ofd->fd = rc;
write_ofd->priv_nr = q;
write_ofd->data = hdl;
- write_ofd->when = BSC_FD_WRITE;
+ write_ofd->when = OSMO_FD_WRITE;
rc = osmo_fd_register(write_ofd);
if (rc < 0) {
close(write_ofd->fd);
diff --git a/src/osmobts_sock.cpp b/src/osmobts_sock.cpp
index a139011..8d3d26f 100644
--- a/src/osmobts_sock.cpp
+++ b/src/osmobts_sock.cpp
@@ -82,7 +82,7 @@ int pcu_sock_send(struct msgb *msg)
return -EIO;
}
msgb_enqueue(&pcu_sock_state.upqueue, msg);
- conn_bfd->when |= BSC_FD_WRITE;
+ conn_bfd->when |= OSMO_FD_WRITE;
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 &= ~BSC_FD_WRITE;
+ bfd->when &= ~OSMO_FD_WRITE;
/* 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 |= BSC_FD_WRITE;
+ bfd->when |= OSMO_FD_WRITE;
break;
}
goto close;
@@ -192,12 +192,12 @@ static int pcu_sock_cb(struct osmo_fd *bfd, unsigned int flags)
{
int rc = 0;
- if (flags & BSC_FD_READ)
+ if (flags & OSMO_FD_READ)
rc = pcu_sock_read(bfd);
if (rc < 0)
return rc;
- if (flags & BSC_FD_WRITE)
+ if (flags & OSMO_FD_WRITE)
rc = pcu_sock_write(bfd);
return rc;