diff --git a/daemon/igmp.hpp b/daemon/igmp.hpp index 3cf83a0..2fb808c 100644 --- a/daemon/igmp.hpp +++ b/daemon/igmp.hpp @@ -40,7 +40,7 @@ class IGMP { bool join(const std::string& interface_ip, const std::string& mcast_ip) { uint32_t mcast_ip_addr = - ip::make_address(mcast_ip.c_str()).to_v4().to_ulong(); + ip::make_address(mcast_ip.c_str()).to_v4().to_uint(); std::scoped_lock lock{mutex}; auto it = mcast_ref.find(mcast_ip_addr); @@ -74,7 +74,7 @@ class IGMP { bool leave(const std::string& interface_ip, const std::string& mcast_ip) { uint32_t mcast_ip_addr = - ip::make_address(mcast_ip.c_str()).to_v4().to_ulong(); + ip::make_address(mcast_ip.c_str()).to_v4().to_uint(); std::scoped_lock lock{mutex}; auto it = mcast_ref.find(mcast_ip_addr); diff --git a/daemon/interface.cpp b/daemon/interface.cpp index 8ccca65..826daf3 100644 --- a/daemon/interface.cpp +++ b/daemon/interface.cpp @@ -171,7 +171,7 @@ bool ping(const std::string& ip) { io_context io_service; icmp::socket socket{io_service, icmp::v4()}; ip::icmp::endpoint destination(ip::icmp::v4(), - ip::make_address(ip).to_v4().to_ulong()); + ip::make_address(ip).to_v4().to_uint()); socket.send_to(boost::asio::buffer(buffer, sizeof buffer), destination); } catch (...) { BOOST_LOG_TRIVIAL(error) << "ping:: send_to() failed"; diff --git a/daemon/rtsp_client.cpp b/daemon/rtsp_client.cpp index af9df89..9d34ff4 100644 --- a/daemon/rtsp_client.cpp +++ b/daemon/rtsp_client.cpp @@ -206,7 +206,7 @@ std::pair RtspClient::process( << crc16(reinterpret_cast(res.body.c_str()), res.body.length()); /*<< std::hex << - * ip::make_address(address.c_str()).to_ulong();*/ + * ip::make_address(address.c_str()).to_uint();*/ rtsp_source.id = ss.str(); rtsp_source.source = "mDNS"; rtsp_source.address = address; diff --git a/daemon/session_manager.cpp b/daemon/session_manager.cpp index e0eecd2..6603926 100644 --- a/daemon/session_manager.cpp +++ b/daemon/session_manager.cpp @@ -255,7 +255,7 @@ bool SessionManager::parse_sdp(const std::string& sdp, StreamInfo& info) const { return false; } info.stream.m_ui32DestIP = - ip::make_address(fields[2].c_str()).to_v4().to_ulong(); + ip::make_address(fields[2].c_str()).to_v4().to_uint(); if (info.stream.m_ui32DestIP == INADDR_NONE) { BOOST_LOG_TRIVIAL(error) << "session_manager:: invalid IPv4 " "connection address in SDP at line " @@ -527,12 +527,12 @@ std::error_code SessionManager::add_source(const StreamSource& source) { ip::make_address(source.address, ec); if (!ec) { info.stream.m_ui32DestIP = - ip::make_address(source.address).to_v4().to_ulong(); + ip::make_address(source.address).to_v4().to_uint(); } else { info.stream.m_ui32DestIP = ip::make_address(config_->get_rtp_mcast_base().c_str()) .to_v4() - .to_ulong() + + .to_uint() + source.id; } info.stream.m_usSrcPort = config_->get_rtp_port();