Timur Davydov has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/42702?usp=email )
Change subject: smux: allow lchan lookup without remote address ......................................................................
smux: allow lchan lookup without remote address
Make rem_addr optional in osmux_lchan_find() by skipping address comparison when it is NULL
This allows callers without socket-based addressing to locate lchans by CID only (e.g. callback-based transports)
Change-Id: I7a275dad2353241c7b04cdb5d6cc1436a175c1f3 --- M src/common/osmux.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/02/42702/1
diff --git a/src/common/osmux.c b/src/common/osmux.c index 9513bdc..52885eb 100644 --- a/src/common/osmux.c +++ b/src/common/osmux.c @@ -267,7 +267,7 @@ if (lchan->abis_ip.osmux.local_cid != osmux_cid) continue; h = osmux_xfrm_input_get_deliver_cb_data(lchan->abis_ip.osmux.in); - if (osmo_sockaddr_cmp(&h->rem_addr, rem_addr) != 0) + if (rem_addr && osmo_sockaddr_cmp(&h->rem_addr, rem_addr) != 0) continue; return lchan; /* Found it! */ }