Commit 54988138 authored by Guillaume Roguez's avatar Guillaume Roguez

daemon: remove unconditional ucommon/ccrtp references

Refs #63443

Change-Id: I99bcd3eeeb29eac05cd46605e3356c36fb33f633
parent 150a936a
......@@ -33,7 +33,6 @@
#define IP_UTILS_H_
#include <pjlib.h>
#include <ccrtp/channel.h> // For ost::IPV*Address
#include <netinet/ip.h>
......@@ -137,23 +136,6 @@ public:
return &addr;
}
inline operator ost::IPV4Host () const {
assert(addr.addr.sa_family == AF_INET);
const sockaddr_in& ipv4_addr = *reinterpret_cast<const sockaddr_in*>(&addr);
return ost::IPV4Host(ipv4_addr.sin_addr);
}
inline operator ost::IPV6Host () const {
assert(addr.addr.sa_family == AF_INET6);
#ifndef __ANDROID__ // hack for the ucommoncpp bug (fixed in our Android repo)
ost::IPV6Host host = ost::IPV6Host(toString().c_str());
return host;
#else
const sockaddr_in6& ipv6_addr = *reinterpret_cast<const sockaddr_in6*>(&addr);
return ost::IPV6Host(ipv6_addr.sin6_addr);
#endif
}
inline operator std::string () const {
return toString();
}
......
......@@ -387,9 +387,6 @@ ManagerImpl::outgoingCall(const std::string& preferred_account_id,
*/
RING_DBG("New outgoing call to %s", to_cleaned.c_str());
call = newOutgoingCall(call_id, to_cleaned, preferred_account_id);
} catch (ost::Socket *) {
RING_ERR("Could not bind socket");
return false;
} catch (const std::exception &e) {
RING_ERR("%s", e.what());
return false;
......
......@@ -613,8 +613,6 @@ SIPCall::offhold()
} catch (const SdpException &e) {
RING_ERR("%s", e.what());
throw VoipLinkException("SDP issue in offhold");
} catch (const ost::Socket::Error &e) {
throw VoipLinkException("Socket problem in offhold");
}
#if USE_CCRTP
catch (const ost::Socket *) {
......
......@@ -86,40 +86,4 @@ void IpTest::testIpAddr()
#endif
}
void IpTest::testIpAddrOst()
{
TITLE();
const IpAddr ipv4 = {"8.8.8.8"};
ost::IPV4Host v4host = ipv4;
IpAddr ip = v4host.getAddress();
CPPUNIT_ASSERT(ipv4 == ip);
#if HAVE_IPV6
const IpAddr ipv6 = {"2001:4860:4860::8888"};
ost::IPV6Host v6host = ipv6;
ip = v6host.getAddress();
CPPUNIT_ASSERT(ipv6 == ip);
ost::IPV6Host v6host2 = v6host;
ip = v6host2.getAddress();
CPPUNIT_ASSERT(ipv6 == ip);
ost::IPV6Host v6host3 = {};
ip = v6host3.getAddress();
CPPUNIT_ASSERT(ip);
CPPUNIT_ASSERT(v6host3.getAddressCount() > 0 && v6host3.getAddressCount() < 256);
v6host3 = v6host;
CPPUNIT_ASSERT(IpAddr(v6host3.getAddress()) == ipv6);
CPPUNIT_ASSERT(v6host3.getAddressCount() == 1);
v6host3 = v6host2.getAddress();
CPPUNIT_ASSERT(IpAddr(v6host3.getAddress()) == ipv6);
CPPUNIT_ASSERT(v6host3.getAddressCount() == 1);
#endif
}
IpTest::IpTest() : CppUnit::TestCase("IP Tests") {}
......@@ -49,7 +49,6 @@ class IpTest : public CppUnit::TestCase {
*/
CPPUNIT_TEST_SUITE(IpTest);
CPPUNIT_TEST(testIpAddr);
CPPUNIT_TEST(testIpAddrOst);
CPPUNIT_TEST_SUITE_END();
public:
......@@ -57,7 +56,6 @@ class IpTest : public CppUnit::TestCase {
IpTest();
void testIpAddr();
void testIpAddrOst();
};
/* Register our test module */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment