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/.
Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5710
Sockets.cpp: Fix initialization of UDD socket
Without this line, destination address for a UDD socket is left with
incorrect value AF_UNSPEC. Later on when calling DatagramSocket:write(),
sendto() fails with EINVAL.
This commit fixes test SocketsTest.cpp.
Change-Id: I6e1b7e743a781abdcf69aa9842b30be893633433
---
M CommonLibs/Sockets.cpp
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/10/5710/1
diff --git a/CommonLibs/Sockets.cpp b/CommonLibs/Sockets.cpp
index a65d62b..11e96dd 100644
--- a/CommonLibs/Sockets.cpp
+++ b/CommonLibs/Sockets.cpp
@@ -324,6 +324,7 @@
void UDDSocket::destination(const char* remotePath)
{
struct sockaddr_un* unAddr = (struct sockaddr_un*)mDestination;
+ unAddr->sun_family = AF_UNIX;
strcpy(unAddr->sun_path,remotePath);
}
--
To view, visit https://gerrit.osmocom.org/5710
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e1b7e743a781abdcf69aa9842b30be893633433
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>