This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/6008 cosmetic: move mgcp_release_endp() to mgcp_ep.c - move mgcp_release_endp() to mgcp_ep.c since it is clearly an endpoint sicific function. Change-Id: I0a65b6e906c52a9e7cd75c88c4cbe1bf473b866b --- M include/osmocom/mgcp/mgcp.h M include/osmocom/mgcp/mgcp_ep.h M src/libosmo-mgcp/mgcp_ep.c M src/libosmo-mgcp/mgcp_protocol.c M src/libosmo-mgcp/mgcp_vty.c M src/osmo-mgw/mgw_main.c 6 files changed, 27 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/08/6008/1 diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 0d156c6..bdc8f87 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -222,7 +222,6 @@ enum mgcp_role role); int mgcp_vty_init(void); int mgcp_endpoints_allocate(struct mgcp_trunk_config *cfg); -void mgcp_release_endp(struct mgcp_endpoint *endp); void mgcp_trunk_set_keepalive(struct mgcp_trunk_config *tcfg, int interval); /* diff --git a/include/osmocom/mgcp/mgcp_ep.h b/include/osmocom/mgcp/mgcp_ep.h index 0216ff8..7b4ccee 100644 --- a/include/osmocom/mgcp/mgcp_ep.h +++ b/include/osmocom/mgcp/mgcp_ep.h @@ -59,3 +59,5 @@ /*! static MGCP endpoint typeset (pre-initalized, read-only) */ extern const struct mgcp_endpoint_typeset ep_typeset; + +void mgcp_release_endp(struct mgcp_endpoint *endp); diff --git a/src/libosmo-mgcp/mgcp_ep.c b/src/libosmo-mgcp/mgcp_ep.c index 9d0dbbc..e23d0f1 100644 --- a/src/libosmo-mgcp/mgcp_ep.c +++ b/src/libosmo-mgcp/mgcp_ep.c @@ -31,3 +31,26 @@ .rtp.dispatch_rtp_cb = mgcp_dispatch_rtp_bridge_cb, .rtp.cleanup_cb = mgcp_cleanup_rtp_bridge_cb }; + +/*! release endpoint, all open connections are closed. + * \param[in] endp endpoint to release */ +void mgcp_release_endp(struct mgcp_endpoint *endp) +{ + LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", + ENDPOINT_NUMBER(endp)); + + /* Normally this function should only be called when + * all connections have been removed already. In case + * that there are still connections open (e.g. when + * RSIP is executed), free them all at once. */ + mgcp_conn_free_all(endp); + + /* Reset endpoint parameters and states */ + talloc_free(endp->callid); + endp->callid = NULL; + talloc_free(endp->local_options.string); + endp->local_options.string = NULL; + talloc_free(endp->local_options.codec); + endp->local_options.codec = NULL; + endp->wildcarded_crcx = false; +} diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c index 73d7f5e..bae8c9d 100644 --- a/src/libosmo-mgcp/mgcp_protocol.c +++ b/src/libosmo-mgcp/mgcp_protocol.c @@ -1213,29 +1213,6 @@ return 0; } -/*! release endpoint, all open connections are closed. - * \param[in] endp endpoint to release */ -void mgcp_release_endp(struct mgcp_endpoint *endp) -{ - LOGP(DLMGCP, LOGL_DEBUG, "Releasing endpoint:0x%x\n", - ENDPOINT_NUMBER(endp)); - - /* Normally this function should only be called when - * all connections have been removed already. In case - * that there are still connections open (e.g. when - * RSIP is executed), free them all at once. */ - mgcp_conn_free_all(endp); - - /* Reset endpoint parameters and states */ - talloc_free(endp->callid); - endp->callid = NULL; - talloc_free(endp->local_options.string); - endp->local_options.string = NULL; - talloc_free(endp->local_options.codec); - endp->local_options.codec = NULL; - endp->wildcarded_crcx = false; -} - static int send_agent(struct mgcp_config *cfg, const char *buf, int len) { return write(cfg->gw_fd.bfd.fd, buf, len); diff --git a/src/libosmo-mgcp/mgcp_vty.c b/src/libosmo-mgcp/mgcp_vty.c index 7043527..99780c8 100644 --- a/src/libosmo-mgcp/mgcp_vty.c +++ b/src/libosmo-mgcp/mgcp_vty.c @@ -27,6 +27,7 @@ #include <osmocom/mgcp/mgcp_internal.h> #include <osmocom/mgcp/vty.h> #include <osmocom/mgcp/mgcp_conn.h> +#include <osmocom/mgcp/mgcp_ep.h> #include <string.h> diff --git a/src/osmo-mgw/mgw_main.c b/src/osmo-mgw/mgw_main.c index a2714e0..8e956e4 100644 --- a/src/osmo-mgw/mgw_main.c +++ b/src/osmo-mgw/mgw_main.c @@ -37,6 +37,7 @@ #include <osmocom/mgcp/mgcp_internal.h> #include <osmocom/mgcp/vty.h> #include <osmocom/mgcp/debug.h> +#include <osmocom/mgcp/mgcp_ep.h> #include <osmocom/core/application.h> #include <osmocom/core/msgb.h> -- To view, visit https://gerrit.osmocom.org/6008 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a65b6e906c52a9e7cd75c88c4cbe1bf473b866b Gerrit-PatchSet: 1 Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de>