Attention is currently required from: neels.
1 comment:
File src/socket.c:
Patch Set #1, Line 1779: os->u.sa.sa_family = AF_INET;
This should have been kept as os->u.sin.sin_family, since here you already know you are using the struct sockaddr_in of the union.
In the case above which I asked you change, it's more conceptually correct to check the generic struct sockaddr (os->u.sa) field instead of the struct sockaddr_in one (os->u.sin), since you still don't know at that point whether the osmo_sockaddr is from type sockaddr_in.
In practice of course it doesn't matter since the os->u.sa.sa_family and os->u.sin.sin_family field point to same place in memory, but conceptually it makes sense to do it the way I say. Otherwise it's like accessing a subclass field without knowing whether the abstract class/interface is actually an instance of that subclass.
To view, visit change 27085. To unsubscribe, or for help writing mail filters, visit settings.