osmux: Using the "CI" and calling it "CID" is plain wrong
The CI is a MGCP value that is counted from 0 upwards. The code
is comparing a uint8_t with a uint32_t. This will only work for
up to UINT8_MAX calls and then will silently break. The code should
probably work with the endpoint number and not the CI. For now
truncate things and hope things work.
diff --git a/openbsc/src/libmgcp/osmux.c b/openbsc/src/libmgcp/osmux.c
index 71d001f..1c59e26 100644
--- a/openbsc/src/libmgcp/osmux.c
+++ b/openbsc/src/libmgcp/osmux.c
@@ -171,7 +171,7 @@
return NULL;
}
- if (tmp->ci == cid && this->s_addr == from_addr->s_addr)
+ if ((tmp->ci & 0xFF) == cid && this->s_addr == from_addr->s_addr)
return tmp;
}