aboutsummaryrefslogtreecommitdiffstats
path: root/src/mgcp/mgcp_network.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-05-08 10:29:23 +0200
committerHarald Welte <laforge@gnumonks.org>2011-05-08 10:29:23 +0200
commitff397edf385cc055fe1665780c3a5395ee9d48be (patch)
treede96bb4800ebc23171d48d25e2b8a1a8c662f188 /src/mgcp/mgcp_network.c
parentedfadaeb3d73147a409f0f45afc48f7dc2207853 (diff)
Adopt to recent libosmocore namespace changes and libosmogsm
Diffstat (limited to 'src/mgcp/mgcp_network.c')
-rw-r--r--src/mgcp/mgcp_network.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mgcp/mgcp_network.c b/src/mgcp/mgcp_network.c
index 5bac1af..9649b33 100644
--- a/src/mgcp/mgcp_network.c
+++ b/src/mgcp/mgcp_network.c
@@ -29,8 +29,8 @@
#include <sys/socket.h>
#include <arpa/inet.h>
-#include <osmocore/msgb.h>
-#include <osmocore/select.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/select.h>
#include <mgcp/mgcp.h>
#include <mgcp/mgcp_internal.h>
@@ -256,7 +256,7 @@ static int recevice_from(struct mgcp_endpoint *endp, int fd, struct sockaddr_in
return rc;
}
-static int rtp_data_net(struct bsc_fd *fd, unsigned int what)
+static int rtp_data_net(struct osmo_fd *fd, unsigned int what)
{
char buf[4096];
struct sockaddr_in addr;
@@ -328,7 +328,7 @@ static void discover_bts(struct mgcp_endpoint *endp, int proto, struct sockaddr_
}
}
-static int rtp_data_bts(struct bsc_fd *fd, unsigned int what)
+static int rtp_data_bts(struct osmo_fd *fd, unsigned int what)
{
char buf[4096];
struct sockaddr_in addr;
@@ -382,7 +382,7 @@ static int rtp_data_bts(struct bsc_fd *fd, unsigned int what)
}
static int rtp_data_transcoder(struct mgcp_rtp_end *end, struct mgcp_endpoint *_endp,
- int dest, struct bsc_fd *fd)
+ int dest, struct osmo_fd *fd)
{
char buf[4096];
struct sockaddr_in addr;
@@ -422,7 +422,7 @@ static int rtp_data_transcoder(struct mgcp_rtp_end *end, struct mgcp_endpoint *_
return send_to(_endp, dest, proto == PROTO_RTP, &addr, &buf[0], rc);
}
-static int rtp_data_trans_net(struct bsc_fd *fd, unsigned int what)
+static int rtp_data_trans_net(struct osmo_fd *fd, unsigned int what)
{
struct mgcp_endpoint *endp;
endp = (struct mgcp_endpoint *) fd->data;
@@ -430,7 +430,7 @@ static int rtp_data_trans_net(struct bsc_fd *fd, unsigned int what)
return rtp_data_transcoder(&endp->trans_net, endp, DEST_NETWORK, fd);
}
-static int rtp_data_trans_bts(struct bsc_fd *fd, unsigned int what)
+static int rtp_data_trans_bts(struct osmo_fd *fd, unsigned int what)
{
struct mgcp_endpoint *endp;
endp = (struct mgcp_endpoint *) fd->data;
@@ -438,7 +438,7 @@ static int rtp_data_trans_bts(struct bsc_fd *fd, unsigned int what)
return rtp_data_transcoder(&endp->trans_bts, endp, DEST_BTS, fd);
}
-static int create_bind(const char *source_addr, struct bsc_fd *fd, int port)
+static int create_bind(const char *source_addr, struct osmo_fd *fd, int port)
{
struct sockaddr_in addr;
int on = 1;
@@ -490,14 +490,14 @@ static int bind_rtp(struct mgcp_config *cfg, struct mgcp_rtp_end *rtp_end, int e
set_ip_tos(rtp_end->rtcp.fd, cfg->endp_dscp);
rtp_end->rtp.when = BSC_FD_READ;
- if (bsc_register_fd(&rtp_end->rtp) != 0) {
+ if (osmo_fd_register(&rtp_end->rtp) != 0) {
LOGP(DMGCP, LOGL_ERROR, "Failed to register RTP port %d on 0x%x\n",
rtp_end->local_port, endpno);
goto cleanup2;
}
rtp_end->rtcp.when = BSC_FD_READ;
- if (bsc_register_fd(&rtp_end->rtcp) != 0) {
+ if (osmo_fd_register(&rtp_end->rtcp) != 0) {
LOGP(DMGCP, LOGL_ERROR, "Failed to register RTCP port %d on 0x%x\n",
rtp_end->local_port + 1, endpno);
goto cleanup3;
@@ -506,7 +506,7 @@ static int bind_rtp(struct mgcp_config *cfg, struct mgcp_rtp_end *rtp_end, int e
return 0;
cleanup3:
- bsc_unregister_fd(&rtp_end->rtp);
+ osmo_fd_unregister(&rtp_end->rtp);
cleanup2:
close(rtp_end->rtcp.fd);
rtp_end->rtcp.fd = -1;
@@ -518,7 +518,7 @@ cleanup0:
}
static int int_bind(const char *port,
- struct mgcp_rtp_end *end, int (*cb)(struct bsc_fd *, unsigned),
+ struct mgcp_rtp_end *end, int (*cb)(struct osmo_fd *, unsigned),
struct mgcp_endpoint *_endp, int rtp_port)
{
if (end->rtp.fd != -1 || end->rtcp.fd != -1) {
@@ -565,13 +565,13 @@ int mgcp_free_rtp_port(struct mgcp_rtp_end *end)
if (end->rtp.fd != -1) {
close(end->rtp.fd);
end->rtp.fd = -1;
- bsc_unregister_fd(&end->rtp);
+ osmo_fd_unregister(&end->rtp);
}
if (end->rtcp.fd != -1) {
close(end->rtcp.fd);
end->rtcp.fd = -1;
- bsc_unregister_fd(&end->rtcp);
+ osmo_fd_unregister(&end->rtcp);
}
return 0;