aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 19:50:44 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-12 20:20:30 +0200
commit8f321179747f64819d940d72d0212192f69284ca (patch)
tree9fc9f57d711f653bf0ef6520a9d978603ec57f1e
parentb010f869c915016b7fa97a26621582cd89de96b0 (diff)
mgcp: osmux: Make func handling dummy frames independent of endp type
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index ea0372b2b..b46ea1078 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -325,7 +325,7 @@ out:
/* This is called from the bsc-nat */
static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr,
- struct msgb *msg)
+ struct msgb *msg, int endp_type)
{
struct mgcp_endpoint *endp;
uint8_t osmux_cid;
@@ -333,7 +333,7 @@ static int osmux_handle_dummy(struct mgcp_config *cfg, struct sockaddr_in *addr,
if (osmux_legacy_dummy_parse_cid(addr, msg, &osmux_cid) < 0)
goto out;
- endp = endpoint_lookup(cfg, osmux_cid, &addr->sin_addr, MGCP_DEST_BTS);
+ endp = endpoint_lookup(cfg, osmux_cid, &addr->sin_addr, endp_type);
if (!endp) {
LOGP(DMGCP, LOGL_ERROR,
"Cannot find endpoint for Osmux CID %d\n", osmux_cid);
@@ -378,7 +378,7 @@ int osmux_read_from_bsc_cb(struct osmo_fd *ofd, unsigned int what)
/* not any further processing dummy messages */
if (msg->data[0] == MGCP_DUMMY_LOAD)
- return osmux_handle_dummy(cfg, &addr, msg);
+ return osmux_handle_dummy(cfg, &addr, msg, MGCP_DEST_BTS);
rem = msg->len;
while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) {