aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-09-04 12:51:50 +0200
committerHarald Welte <laforge@gnumonks.org>2011-09-04 12:51:50 +0200
commit5ea1bc21b2fc3e21367ff6c59cabbdbf553ab5f2 (patch)
tree3a1aae7426cbef1df8201d3a65a49aec9a5a50bc
parent6b353778c4329deb27f69301c050e0b6e55d4df6 (diff)
HACK: rename 'struct rtp_socket' to 'struct osmo_rtp_socket'laforge/ortp_hack
this is just a hack to make osmo-bts compile. Instead of this hack, openbsc needs to be properly ported over to libosmo-trau (osmo_rtp_*)
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h5
-rw-r--r--openbsc/include/openbsc/rtp_proxy.h18
-rw-r--r--openbsc/src/libbsc/abis_rsl.c2
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c8
-rw-r--r--openbsc/src/libmsc/mncc_builtin.c4
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c28
6 files changed, 36 insertions, 29 deletions
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index ca88fed27..280046128 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -77,7 +77,7 @@ enum bts_gprs_mode {
struct gsm_lchan;
struct gsm_subscriber;
struct gsm_mncc;
-struct rtp_socket;
+struct osmo_rtp_socket;
struct bsc_api;
/* Network Management State */
@@ -176,7 +176,7 @@ struct gsm_lchan {
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t speech_mode;
- struct rtp_socket *rtp_socket;
+ struct osmo_rtp_socket *rtp_socket;
} abis_ip;
uint8_t rqd_ta;
@@ -225,6 +225,7 @@ struct gsm_lchan {
uint8_t rxqual_sub;
} res;
} meas;
+ struct llist_head dl_tch_queue;
#endif
};
diff --git a/openbsc/include/openbsc/rtp_proxy.h b/openbsc/include/openbsc/rtp_proxy.h
index 26cac0df4..90cfe327f 100644
--- a/openbsc/include/openbsc/rtp_proxy.h
+++ b/openbsc/include/openbsc/rtp_proxy.h
@@ -54,7 +54,7 @@ struct rtp_sub_socket {
struct llist_head tx_queue;
};
-struct rtp_socket {
+struct osmo_rtp_socket {
struct llist_head list;
struct rtp_sub_socket rtp;
@@ -64,7 +64,7 @@ struct rtp_socket {
enum rtp_rx_action rx_action;
union {
struct {
- struct rtp_socket *other_sock;
+ struct osmo_rtp_socket *other_sock;
} proxy;
struct {
struct gsm_network *net;
@@ -80,12 +80,12 @@ struct rtp_socket {
} transmit;
};
-struct rtp_socket *rtp_socket_create(void);
-int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip);
-int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port);
-int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other);
-int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net, uint32_t callref);
-int rtp_socket_free(struct rtp_socket *rs);
-int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame);
+struct osmo_rtp_socket *rtp_socket_create(void);
+int rtp_socket_bind(struct osmo_rtp_socket *rs, uint32_t ip);
+int rtp_socket_connect(struct osmo_rtp_socket *rs, uint32_t ip, uint16_t port);
+int rtp_socket_proxy(struct osmo_rtp_socket *this, struct osmo_rtp_socket *other);
+int rtp_socket_upstream(struct osmo_rtp_socket *this, struct gsm_network *net, uint32_t callref);
+int rtp_socket_free(struct osmo_rtp_socket *rs);
+int rtp_send_frame(struct osmo_rtp_socket *rs, struct gsm_data_frame *frame);
#endif /* _RTP_PROXY_H */
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index c8bfbb6d6..ffa7bc94f 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1740,7 +1740,7 @@ int rsl_ipacc_mdcx(struct gsm_lchan *lchan, uint32_t ip, uint16_t port,
/* tell BTS to connect RTP stream to our local RTP socket */
int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan)
{
- struct rtp_socket *rs = lchan->abis_ip.rtp_socket;
+ struct osmo_rtp_socket *rs = lchan->abis_ip.rtp_socket;
int rc;
rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr),
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index dcb6e113d..bca7c38d3 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -98,6 +98,12 @@ static int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection
struct e1inp_sign_link *sign_link =
msg->lchan->ts->trx->rsl_link;
+ if (!sign_link) {
+ LOGP(DCC, LOGL_NOTICE, "gsm48_conn_sendmsg() "
+ "for non-existant sign_link\n");
+ msgb_free(msg);
+ return -EIO;
+ }
msg->dst = sign_link;
if ((gh->proto_discr & GSM48_PDISC_MASK) == GSM48_PDISC_CC)
DEBUGP(DCC, "(bts %d trx %d ts %d ti %02x) "
@@ -1488,7 +1494,7 @@ static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable);
static int handle_ho_signal(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data)
{
- struct rtp_socket *old_rs, *new_rs, *other_rs;
+ struct osmo_rtp_socket *old_rs, *new_rs, *other_rs;
struct ho_signal_data *sig = signal_data;
if (subsys != SS_HO || signal != S_HANDOVER_ACK)
diff --git a/openbsc/src/libmsc/mncc_builtin.c b/openbsc/src/libmsc/mncc_builtin.c
index 105f1dd96..00503d737 100644
--- a/openbsc/src/libmsc/mncc_builtin.c
+++ b/openbsc/src/libmsc/mncc_builtin.c
@@ -112,7 +112,7 @@ static int mncc_setup_ind(struct gsm_call *call, int msg_type,
/* modify mode */
memset(&mncc, 0, sizeof(struct gsm_mncc));
mncc.callref = call->callref;
- mncc.lchan_mode = GSM48_CMODE_SPEECH_EFR;
+ mncc.lchan_mode = GSM48_CMODE_SPEECH_V1;
DEBUGP(DMNCC, "(call %x) Modify channel mode.\n", call->callref);
mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, &mncc);
@@ -346,7 +346,7 @@ int int_mncc_recv(struct gsm_network *net, struct msgb *msg)
break;
case MNCC_CALL_CONF_IND:
/* we now need to MODIFY the channel */
- data->lchan_mode = GSM48_CMODE_SPEECH_EFR;
+ data->lchan_mode = GSM48_CMODE_SPEECH_V1;
mncc_tx_to_cc(call->net, MNCC_LCHAN_MODIFY, data);
break;
case MNCC_ALERT_IND:
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 2aa3a1e71..95e6a941a 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -206,7 +206,7 @@ static void tv_difference(struct timeval *diff, const struct timeval *from,
}
/* encode and send a rtp frame */
-int rtp_send_frame(struct rtp_socket *rs, struct gsm_data_frame *frame)
+int rtp_send_frame(struct osmo_rtp_socket *rs, struct gsm_data_frame *frame)
{
struct rtp_sub_socket *rss = &rs->rtp;
struct msgb *msg;
@@ -339,7 +339,7 @@ static int rtcp_sdes_cname_mangle(struct msgb *msg, struct rtcp_hdr *rh,
return 0;
}
-static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs)
+static int rtcp_mangle(struct msgb *msg, struct osmo_rtp_socket *rs)
{
struct rtp_sub_socket *rss = &rs->rtcp;
struct rtcp_hdr *rtph;
@@ -376,7 +376,7 @@ static int rtcp_mangle(struct msgb *msg, struct rtp_socket *rs)
}
/* read from incoming RTP/RTCP socket */
-static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss)
+static int rtp_socket_read(struct osmo_rtp_socket *rs, struct rtp_sub_socket *rss)
{
int rc;
struct msgb *msg = msgb_alloc(RTP_ALLOC_SIZE, "RTP/RTCP");
@@ -458,7 +458,7 @@ out_free:
}
/* write from tx_queue to RTP/RTCP socket */
-static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss)
+static int rtp_socket_write(struct osmo_rtp_socket *rs, struct rtp_sub_socket *rss)
{
struct msgb *msg;
int written;
@@ -485,7 +485,7 @@ static int rtp_socket_write(struct rtp_socket *rs, struct rtp_sub_socket *rss)
/* callback for the select.c:bfd_* layer */
static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags)
{
- struct rtp_socket *rs = bfd->data;
+ struct osmo_rtp_socket *rs = bfd->data;
struct rtp_sub_socket *rss;
switch (bfd->priv_nr) {
@@ -509,7 +509,7 @@ static int rtp_bfd_cb(struct osmo_fd *bfd, unsigned int flags)
}
static void init_rss(struct rtp_sub_socket *rss,
- struct rtp_socket *rs, int fd, int priv_nr)
+ struct osmo_rtp_socket *rs, int fd, int priv_nr)
{
/* initialize bfd */
rss->bfd.fd = fd;
@@ -518,14 +518,14 @@ static void init_rss(struct rtp_sub_socket *rss,
rss->bfd.cb = rtp_bfd_cb;
}
-struct rtp_socket *rtp_socket_create(void)
+struct osmo_rtp_socket *rtp_socket_create(void)
{
int rc;
- struct rtp_socket *rs;
+ struct osmo_rtp_socket *rs;
DEBUGP(DLMUX, "rtp_socket_create(): ");
- rs = talloc_zero(tall_bsc_ctx, struct rtp_socket);
+ rs = talloc_zero(tall_bsc_ctx, struct osmo_rtp_socket);
if (!rs)
return NULL;
@@ -598,7 +598,7 @@ static int rtp_sub_socket_bind(struct rtp_sub_socket *rss, uint32_t ip,
static unsigned int next_udp_port = RTP_PORT_BASE;
/* bind a RTP socket to a local address */
-int rtp_socket_bind(struct rtp_socket *rs, uint32_t ip)
+int rtp_socket_bind(struct osmo_rtp_socket *rs, uint32_t ip)
{
int rc = -EIO;
struct in_addr ia;
@@ -649,7 +649,7 @@ static int rtp_sub_socket_connect(struct rtp_sub_socket *rss,
}
/* 'connect' a RTP socket to a remote peer */
-int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port)
+int rtp_socket_connect(struct osmo_rtp_socket *rs, uint32_t ip, uint16_t port)
{
int rc;
struct in_addr ia;
@@ -666,7 +666,7 @@ int rtp_socket_connect(struct rtp_socket *rs, uint32_t ip, uint16_t port)
}
/* bind two RTP/RTCP sockets together */
-int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other)
+int rtp_socket_proxy(struct osmo_rtp_socket *this, struct osmo_rtp_socket *other)
{
DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, other=%p)\n",
this, other);
@@ -681,7 +681,7 @@ int rtp_socket_proxy(struct rtp_socket *this, struct rtp_socket *other)
}
/* bind RTP/RTCP socket to application */
-int rtp_socket_upstream(struct rtp_socket *this, struct gsm_network *net,
+int rtp_socket_upstream(struct osmo_rtp_socket *this, struct gsm_network *net,
uint32_t callref)
{
DEBUGP(DLMUX, "rtp_socket_proxy(this=%p, callref=%u)\n",
@@ -705,7 +705,7 @@ static void free_tx_queue(struct rtp_sub_socket *rss)
msgb_free(msg);
}
-int rtp_socket_free(struct rtp_socket *rs)
+int rtp_socket_free(struct osmo_rtp_socket *rs)
{
DEBUGP(DLMUX, "rtp_socket_free(rs=%p)\n", rs);