neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-mgw/+/35301?usp=email )
Change subject: mgcp_codec_decide: remove redundant lookup
......................................................................
mgcp_codec_decide: remove redundant lookup
We already did a lookup from conn_src[i] and found a matching
codec_conn_dst, no need to do another reverse lookup to end up at the
same conn_src[i] codec.
Change-Id: Iecc7f22c551fd17b23db434fdb177266407d2621
---
M src/libosmo-mgcp/mgcp_codec.c
1 file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/01/35301/1
diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 7e88ae7..0fd1f61 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -455,7 +455,7 @@
/* We found the a codec that is exactly the same (same codec, same payload format
etc.) on both
* sides. We now set this codec on both connections. */
conn_dst->end.codec = codec_conn_dst;
- conn_src->end.codec = mgcp_codec_find_same(conn_src, codec_conn_dst);
+ conn_src->end.codec = &conn_src->end.codecs[i];
OSMO_ASSERT(conn_src->end.codec);
return 0;
}
@@ -469,7 +469,7 @@
/* We found the a codec that we are able to convert on both sides. We now set this
codec on both
* connections. */
conn_dst->end.codec = codec_conn_dst;
- conn_src->end.codec = codec_find_convertible(conn_src, codec_conn_dst);
+ conn_src->end.codec = &conn_src->end.codecs[i];
OSMO_ASSERT(conn_src->end.codec);
return 0;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-mgw/+/35301?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iecc7f22c551fd17b23db434fdb177266407d2621
Gerrit-Change-Number: 35301
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange