aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-08 15:35:36 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-08 16:39:13 +0000
commit9fb8ddf00e36d86d77cc91b7fd22f3644178fd6d (patch)
treec22b532b8879f526e7e24b273964294327206ea0
parent182ca3bad43092147fc92e0226533acc9ca81260 (diff)
osmux: Document func and return different rc upon osmux init failure
-rw-r--r--src/libosmo-mgcp/mgcp_protocol.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index bfb88bcf5..3a4e39608 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -671,12 +671,17 @@ uint32_t mgcp_rtp_packet_duration(struct mgcp_endpoint *endp,
rtp->codec->frame_duration_den;
}
+/*! Initializes osmux socket if not yet initialized. Parses Osmux CID from MGCP line.
+ * \param[in] endp Endpoint willing to initialize osmux
+ * \param[in] line Line X-Osmux from MGCP header msg to parse
+ * \returns OSMUX CID, -1 for wildcard, -2 on parse error, -3 on osmux initalize error
+ */
static int mgcp_osmux_setup(struct mgcp_endpoint *endp, const char *line)
{
if (!endp->cfg->osmux_init) {
if (osmux_init(OSMUX_ROLE_BSC, endp->cfg) < 0) {
LOGPENDP(endp, DLMGCP, LOGL_ERROR, "Cannot init OSMUX\n");
- return -1;
+ return -3;
}
LOGPENDP(endp, DLMGCP, LOGL_NOTICE, "OSMUX socket has been set up\n");
}