aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-16 15:54:51 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-16 15:54:51 +0100
commita774eb81607ed78a1cf4a0601a9441f3caaa99bb (patch)
tree72d15245ab664640fbb7f51fcd94830fe01f1ce0
parentfb97e4fd3f2d44a44138cb3a16d95aff4cd5fb62 (diff)
downloadODR-SourceCompanion-a774eb81607ed78a1cf4a0601a9441f3caaa99bb.tar.gz
ODR-SourceCompanion-a774eb81607ed78a1cf4a0601a9441f3caaa99bb.tar.bz2
ODR-SourceCompanion-a774eb81607ed78a1cf4a0601a9441f3caaa99bb.zip
Update PadInterface to make it identical to ODR-AudioEnc
-rw-r--r--src/PadInterface.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PadInterface.cpp b/src/PadInterface.cpp
index e9285d8..47b9bce 100644
--- a/src/PadInterface.cpp
+++ b/src/PadInterface.cpp
@@ -37,7 +37,7 @@ void PadInterface::open(const std::string& pad_ident)
{
m_pad_ident = pad_ident;
- m_sock = socket(AF_UNIX, SOCK_DGRAM, 0);
+ m_sock = ::socket(AF_UNIX, SOCK_DGRAM, 0);
if (m_sock == -1) {
throw runtime_error("PAD socket creation failed: " + string(strerror(errno)));
}
@@ -61,7 +61,7 @@ void PadInterface::open(const std::string& pad_ident)
fprintf(stderr, "Unlinking of socket %s failed: %s\n", claddr.sun_path, strerror(errno));
}
- int ret = bind(m_sock, (const struct sockaddr *) &claddr, sizeof(struct sockaddr_un));
+ const auto ret = ::bind(m_sock, (const struct sockaddr *) &claddr, sizeof(struct sockaddr_un));
if (ret == -1) {
throw runtime_error("PAD socket bind failed " + string(strerror(errno)));
}
@@ -86,7 +86,7 @@ vector<uint8_t> PadInterface::request(uint8_t padlen)
claddr.sun_family = AF_UNIX;
snprintf(claddr.sun_path, sizeof(claddr.sun_path), "/tmp/%s.padenc", m_pad_ident.c_str());
- ssize_t ret = sendto(m_sock, packet, sizeof(packet), 0, (struct sockaddr*)&claddr, sizeof(struct sockaddr_un));
+ ssize_t ret = ::sendto(m_sock, packet, sizeof(packet), 0, (struct sockaddr*)&claddr, sizeof(struct sockaddr_un));
if (ret == -1) {
// This suppresses the -Wlogical-op warning
if (errno == EAGAIN
@@ -116,7 +116,7 @@ vector<uint8_t> PadInterface::request(uint8_t padlen)
vector<uint8_t> buffer(2048);
while (true) {
- ret = recvfrom(m_sock, buffer.data(), buffer.size(), 0, nullptr, nullptr);
+ ret = ::recvfrom(m_sock, buffer.data(), buffer.size(), 0, nullptr, nullptr);
if (ret == -1) {
// This suppresses the -Wlogical-op warning