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
This commit is contained in:
parent
e6bca376aa
commit
db9ea55c6e
|
@ -157,7 +157,7 @@ int l1if_transport_open(int q, struct lc15l1_hdl *hdl)
|
||||||
read_ofd->priv_nr = q;
|
read_ofd->priv_nr = q;
|
||||||
read_ofd->data = hdl;
|
read_ofd->data = hdl;
|
||||||
read_ofd->cb = l1if_fd_cb;
|
read_ofd->cb = l1if_fd_cb;
|
||||||
read_ofd->when = BSC_FD_READ;
|
read_ofd->when = OSMO_FD_READ;
|
||||||
rc = osmo_fd_register(read_ofd);
|
rc = osmo_fd_register(read_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(read_ofd->fd);
|
close(read_ofd->fd);
|
||||||
|
@ -179,7 +179,7 @@ int l1if_transport_open(int q, struct lc15l1_hdl *hdl)
|
||||||
write_ofd->fd = rc;
|
write_ofd->fd = rc;
|
||||||
write_ofd->priv_nr = q;
|
write_ofd->priv_nr = q;
|
||||||
write_ofd->data = hdl;
|
write_ofd->data = hdl;
|
||||||
write_ofd->when = BSC_FD_WRITE;
|
write_ofd->when = OSMO_FD_WRITE;
|
||||||
rc = osmo_fd_register(write_ofd);
|
rc = osmo_fd_register(write_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(write_ofd->fd);
|
close(write_ofd->fd);
|
||||||
|
|
|
@ -157,7 +157,7 @@ int l1if_transport_open(int q, struct oc2gl1_hdl *hdl)
|
||||||
read_ofd->priv_nr = q;
|
read_ofd->priv_nr = q;
|
||||||
read_ofd->data = hdl;
|
read_ofd->data = hdl;
|
||||||
read_ofd->cb = l1if_fd_cb;
|
read_ofd->cb = l1if_fd_cb;
|
||||||
read_ofd->when = BSC_FD_READ;
|
read_ofd->when = OSMO_FD_READ;
|
||||||
rc = osmo_fd_register(read_ofd);
|
rc = osmo_fd_register(read_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(read_ofd->fd);
|
close(read_ofd->fd);
|
||||||
|
@ -179,7 +179,7 @@ int l1if_transport_open(int q, struct oc2gl1_hdl *hdl)
|
||||||
write_ofd->fd = rc;
|
write_ofd->fd = rc;
|
||||||
write_ofd->priv_nr = q;
|
write_ofd->priv_nr = q;
|
||||||
write_ofd->data = hdl;
|
write_ofd->data = hdl;
|
||||||
write_ofd->when = BSC_FD_WRITE;
|
write_ofd->when = OSMO_FD_WRITE;
|
||||||
rc = osmo_fd_register(write_ofd);
|
rc = osmo_fd_register(write_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(write_ofd->fd);
|
close(write_ofd->fd);
|
||||||
|
|
|
@ -121,7 +121,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *fl1h)
|
||||||
|
|
||||||
ofd->data = fl1h;
|
ofd->data = fl1h;
|
||||||
ofd->priv_nr = q;
|
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,
|
rc = osmo_sock_init_ofd(ofd, AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP,
|
||||||
bts_host, fwd_udp_ports[q],
|
bts_host, fwd_udp_ports[q],
|
||||||
|
|
|
@ -163,7 +163,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *hdl)
|
||||||
read_ofd->priv_nr = q;
|
read_ofd->priv_nr = q;
|
||||||
read_ofd->data = hdl;
|
read_ofd->data = hdl;
|
||||||
read_ofd->cb = l1if_fd_cb;
|
read_ofd->cb = l1if_fd_cb;
|
||||||
read_ofd->when = BSC_FD_READ;
|
read_ofd->when = OSMO_FD_READ;
|
||||||
rc = osmo_fd_register(read_ofd);
|
rc = osmo_fd_register(read_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(read_ofd->fd);
|
close(read_ofd->fd);
|
||||||
|
@ -182,7 +182,7 @@ int l1if_transport_open(int q, struct femtol1_hdl *hdl)
|
||||||
write_ofd->fd = rc;
|
write_ofd->fd = rc;
|
||||||
write_ofd->priv_nr = q;
|
write_ofd->priv_nr = q;
|
||||||
write_ofd->data = hdl;
|
write_ofd->data = hdl;
|
||||||
write_ofd->when = BSC_FD_WRITE;
|
write_ofd->when = OSMO_FD_WRITE;
|
||||||
rc = osmo_fd_register(write_ofd);
|
rc = osmo_fd_register(write_ofd);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
close(write_ofd->fd);
|
close(write_ofd->fd);
|
||||||
|
|
|
@ -82,7 +82,7 @@ int pcu_sock_send(struct msgb *msg)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
msgb_enqueue(&pcu_sock_state.upqueue, msg);
|
msgb_enqueue(&pcu_sock_state.upqueue, msg);
|
||||||
conn_bfd->when |= BSC_FD_WRITE;
|
conn_bfd->when |= OSMO_FD_WRITE;
|
||||||
|
|
||||||
return 0;
|
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);
|
msg = llist_entry(pcu_sock_state.upqueue.next, struct msgb, list);
|
||||||
pcu_prim = (struct gsm_pcu_if *)msg->data;
|
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(...) ? */
|
/* bug hunter 8-): maybe someone forgot msgb_put(...) ? */
|
||||||
if (!msgb_length(msg)) {
|
if (!msgb_length(msg)) {
|
||||||
|
@ -168,7 +168,7 @@ static int pcu_sock_write(struct osmo_fd *bfd)
|
||||||
goto close;
|
goto close;
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
bfd->when |= BSC_FD_WRITE;
|
bfd->when |= OSMO_FD_WRITE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
goto close;
|
goto close;
|
||||||
|
@ -192,12 +192,12 @@ static int pcu_sock_cb(struct osmo_fd *bfd, unsigned int flags)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (flags & BSC_FD_READ)
|
if (flags & OSMO_FD_READ)
|
||||||
rc = pcu_sock_read(bfd);
|
rc = pcu_sock_read(bfd);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
if (flags & BSC_FD_WRITE)
|
if (flags & OSMO_FD_WRITE)
|
||||||
rc = pcu_sock_write(bfd);
|
rc = pcu_sock_write(bfd);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Reference in New Issue