diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-05-08 10:29:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-05-08 10:29:23 +0200 |
commit | ff397edf385cc055fe1665780c3a5395ee9d48be (patch) | |
tree | de96bb4800ebc23171d48d25e2b8a1a8c662f188 /src/mgcp | |
parent | edfadaeb3d73147a409f0f45afc48f7dc2207853 (diff) |
Adopt to recent libosmocore namespace changes and libosmogsm
Diffstat (limited to 'src/mgcp')
-rw-r--r-- | src/mgcp/mgcp_network.c | 28 | ||||
-rw-r--r-- | src/mgcp/mgcp_protocol.c | 12 | ||||
-rw-r--r-- | src/mgcp/mgcp_vty.c | 2 |
3 files changed, 21 insertions, 21 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; diff --git a/src/mgcp/mgcp_protocol.c b/src/mgcp/mgcp_protocol.c index a8b5ddf..8e1ddc6 100644 --- a/src/mgcp/mgcp_protocol.c +++ b/src/mgcp/mgcp_protocol.c @@ -29,9 +29,9 @@ #include <limits.h> #include <unistd.h> -#include <osmocore/msgb.h> -#include <osmocore/talloc.h> -#include <osmocore/select.h> +#include <osmocom/core/msgb.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/select.h> #include <mgcp/mgcp.h> #include <mgcp/mgcp_internal.h> @@ -614,7 +614,7 @@ static struct msgb *handle_create_con(struct mgcp_config *cfg, struct msgb *msg) return create_response_with_sdp(endp, "CRCX", trans_id); error: LOGP(DMGCP, LOGL_ERROR, "Malformed line: %s on 0x%x with: line_start: %d %d\n", - hexdump(msg->l3h, msgb_l3len(msg)), + osmo_hexdump(msg->l3h, msgb_l3len(msg)), ENDPOINT_NUMBER(endp), line_start, i); return create_err_response(error_code, "CRCX", trans_id); @@ -739,7 +739,7 @@ static struct msgb *handle_modify_con(struct mgcp_config *cfg, struct msgb *msg) error: LOGP(DMGCP, LOGL_ERROR, "Malformed line: %s on 0x%x with: line_start: %d %d %d\n", - hexdump(msg->l3h, msgb_l3len(msg)), + osmo_hexdump(msg->l3h, msgb_l3len(msg)), ENDPOINT_NUMBER(endp), line_start, i, msg->l3h[line_start]); return create_err_response(error_code, "MDCX", trans_id); @@ -828,7 +828,7 @@ static struct msgb *handle_delete_con(struct mgcp_config *cfg, struct msgb *msg) error: LOGP(DMGCP, LOGL_ERROR, "Malformed line: %s on 0x%x with: line_start: %d %d\n", - hexdump(msg->l3h, msgb_l3len(msg)), + osmo_hexdump(msg->l3h, msgb_l3len(msg)), ENDPOINT_NUMBER(endp), line_start, i); return create_err_response(error_code, "DLCX", trans_id); diff --git a/src/mgcp/mgcp_vty.c b/src/mgcp/mgcp_vty.c index 717a815..5167721 100644 --- a/src/mgcp/mgcp_vty.c +++ b/src/mgcp/mgcp_vty.c @@ -23,7 +23,7 @@ #include <sys/types.h> -#include <osmocore/talloc.h> +#include <osmocom/core/talloc.h> #include <mgcp/mgcp.h> #include <mgcp/mgcp_internal.h> |