aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-09 19:21:15 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-09 19:21:15 +0200
commitb2ebc59f30b67df53635f27b444e510b1c758e0c (patch)
treee9a58925ccebf379cd8595886d83b45d3bfdf9b5
parent9d550cb36972173fadaaa1e1c8f3d4428106079e (diff)
Use OSMO_FD_* instead of deprecated BSC_FD_*
New define is available since libosmocore 1.1.0, and we already require 1.2.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: Iaebd049e383b02204a12f39cc6c932a53d25fd72
-rw-r--r--src/gprs/sgsn_ares.c12
-rw-r--r--src/gtphub/gtphub.c6
-rw-r--r--src/sgsn/sgsn_libgtp.c8
3 files changed, 13 insertions, 13 deletions
diff --git a/src/gprs/sgsn_ares.c b/src/gprs/sgsn_ares.c
index ba168d62..38e31e13 100644
--- a/src/gprs/sgsn_ares.c
+++ b/src/gprs/sgsn_ares.c
@@ -51,8 +51,8 @@ static int ares_osmo_fd_cb(struct osmo_fd *fd, unsigned int what)
LOGP(DGPRS, LOGL_DEBUG, "C-ares fd(%d) ready(%d)\n", fd->fd, what);
ares_process_fd(sgsn->ares_channel,
- (what & BSC_FD_READ) ? fd->fd : ARES_SOCKET_BAD,
- (what & BSC_FD_WRITE) ? fd->fd : ARES_SOCKET_BAD);
+ (what & OSMO_FD_READ) ? fd->fd : ARES_SOCKET_BAD,
+ (what & OSMO_FD_WRITE) ? fd->fd : ARES_SOCKET_BAD);
osmo_ares_reschedule(sgsn);
return 0;
}
@@ -120,14 +120,14 @@ static void setup_ares_osmo_fd(void *data, int fd, int read, int write)
update_fd:
if (read)
- ufd->fd.when |= BSC_FD_READ;
+ ufd->fd.when |= OSMO_FD_READ;
else
- ufd->fd.when &= ~BSC_FD_READ;
+ ufd->fd.when &= ~OSMO_FD_READ;
if (write)
- ufd->fd.when |= BSC_FD_WRITE;
+ ufd->fd.when |= OSMO_FD_WRITE;
else
- ufd->fd.when &= ~BSC_FD_WRITE;
+ ufd->fd.when &= ~OSMO_FD_WRITE;
osmo_ares_reschedule(sgsn);
}
diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c
index ca5857b3..7b355bf9 100644
--- a/src/gtphub/gtphub.c
+++ b/src/gtphub/gtphub.c
@@ -853,7 +853,7 @@ static int gtphub_sock_init(struct osmo_fd *ofd,
return -1;
}
- ofd->when = BSC_FD_READ;
+ ofd->when = OSMO_FD_READ;
ofd->cb = cb;
ofd->data = data;
ofd->priv_nr = ofd_id;
@@ -1948,7 +1948,7 @@ static int from_sgsns_read_cb(struct osmo_fd *from_sgsns_ofd, unsigned int what)
LOG(LOGL_DEBUG, "=== reading from SGSN (%s)\n",
gtphub_plane_idx_names[plane_idx]);
- if (!(what & BSC_FD_READ))
+ if (!(what & OSMO_FD_READ))
return 0;
struct gtphub *hub = from_sgsns_ofd->data;
@@ -1979,7 +1979,7 @@ static int from_ggsns_read_cb(struct osmo_fd *from_ggsns_ofd, unsigned int what)
OSMO_ASSERT(plane_idx < GTPH_PLANE_N);
LOG(LOGL_DEBUG, "=== reading from GGSN (%s)\n",
gtphub_plane_idx_names[plane_idx]);
- if (!(what & BSC_FD_READ))
+ if (!(what & OSMO_FD_READ))
return 0;
struct gtphub *hub = from_ggsns_ofd->data;
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index c20c8dcf..7b46476b 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -733,7 +733,7 @@ static int sgsn_gtp_fd_cb(struct osmo_fd *fd, unsigned int what)
struct sgsn_instance *sgi = fd->data;
int rc;
- if (!(what & BSC_FD_READ))
+ if (!(what & OSMO_FD_READ))
return 0;
switch (fd->priv_nr) {
@@ -774,7 +774,7 @@ int sgsn_gtp_init(struct sgsn_instance *sgi)
sgi->gtp_fd0.fd = gsn->fd0;
sgi->gtp_fd0.priv_nr = 0;
sgi->gtp_fd0.data = sgi;
- sgi->gtp_fd0.when = BSC_FD_READ;
+ sgi->gtp_fd0.when = OSMO_FD_READ;
sgi->gtp_fd0.cb = sgsn_gtp_fd_cb;
rc = osmo_fd_register(&sgi->gtp_fd0);
if (rc < 0)
@@ -783,7 +783,7 @@ int sgsn_gtp_init(struct sgsn_instance *sgi)
sgi->gtp_fd1c.fd = gsn->fd1c;
sgi->gtp_fd1c.priv_nr = 1;
sgi->gtp_fd1c.data = sgi;
- sgi->gtp_fd1c.when = BSC_FD_READ;
+ sgi->gtp_fd1c.when = OSMO_FD_READ;
sgi->gtp_fd1c.cb = sgsn_gtp_fd_cb;
rc = osmo_fd_register(&sgi->gtp_fd1c);
if (rc < 0) {
@@ -794,7 +794,7 @@ int sgsn_gtp_init(struct sgsn_instance *sgi)
sgi->gtp_fd1u.fd = gsn->fd1u;
sgi->gtp_fd1u.priv_nr = 2;
sgi->gtp_fd1u.data = sgi;
- sgi->gtp_fd1u.when = BSC_FD_READ;
+ sgi->gtp_fd1u.when = OSMO_FD_READ;
sgi->gtp_fd1u.cb = sgsn_gtp_fd_cb;
rc = osmo_fd_register(&sgi->gtp_fd1u);
if (rc < 0) {