⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269150 in webkit


Ignore:
Timestamp:
Oct 29, 2020, 9:20:31 AM (6 years ago)
Author:
youenn@apple.com
Message:

Improve LibWebRTCSocketClient logging
https://bugs.webkit.org/show_bug.cgi?id=218336

Reviewed by Eric Carlson.

Output webrtc socket identifier in case of error.
Fix the case of LibWebRTCSocketClient::sendTo that can log too much.

No observable change of behavior.

  • NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:

(WebKit::LibWebRTCSocketClient::sendTo):
(WebKit::LibWebRTCSocketClient::close):
(WebKit::LibWebRTCSocketClient::setOption):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r269143 r269150  
     12020-10-29  Youenn Fablet  <youenn@apple.com>
     2
     3        Improve LibWebRTCSocketClient logging
     4        https://bugs.webkit.org/show_bug.cgi?id=218336
     5
     6        Reviewed by Eric Carlson.
     7
     8        Output webrtc socket identifier in case of error.
     9        Fix the case of LibWebRTCSocketClient::sendTo that can log too much.
     10
     11        No observable change of behavior.
     12
     13        * NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
     14        (WebKit::LibWebRTCSocketClient::sendTo):
     15        (WebKit::LibWebRTCSocketClient::close):
     16        (WebKit::LibWebRTCSocketClient::setOption):
     17
    1182020-10-29  Chris Lord  <clord@igalia.com>
    219
  • trunk/Source/WebKit/NetworkProcess/webrtc/LibWebRTCSocketClient.cpp

    r263789 r269150  
    7373void LibWebRTCSocketClient::sendTo(const uint8_t* data, size_t size, const rtc::SocketAddress& socketAddress, const rtc::PacketOptions& options)
    7474{
    75     auto result = m_socket->SendTo(data, size, socketAddress, options);
    76     RELEASE_LOG_ERROR_IF(result && m_sendError != result, Network, "LibWebRTCSocketClient::sendTo failed with error %d", m_socket->GetError());
    77     m_sendError = result;
     75    m_socket->SendTo(data, size, socketAddress, options);
     76    auto error = m_socket->GetError();
     77    RELEASE_LOG_ERROR_IF(error && m_sendError != error, Network, "LibWebRTCSocketClient::sendTo (ID=%" PRIu64 ") failed with error %d", m_identifier.toUInt64(), error);
     78    m_sendError = error;
    7879}
    7980
     
    8384    auto result = m_socket->Close();
    8485    UNUSED_PARAM(result);
    85     RELEASE_LOG_ERROR_IF(result, Network, "LibWebRTCSocketClient::close failed with error %d", m_socket->GetError());
     86    RELEASE_LOG_ERROR_IF(result, Network, "LibWebRTCSocketClient::close (ID=%" PRIu64 ") failed with error %d", m_identifier.toUInt64(), m_socket->GetError());
    8687
    8788    m_rtcProvider.takeSocket(m_identifier);
     
    9394    auto result = m_socket->SetOption(static_cast<rtc::Socket::Option>(option), value);
    9495    UNUSED_PARAM(result);
    95     RELEASE_LOG_ERROR_IF(result, Network, "LibWebRTCSocketClient::setOption(%d, %d) failed with error %d", option, value, m_socket->GetError());
     96    RELEASE_LOG_ERROR_IF(result, Network, "LibWebRTCSocketClient::setOption(%d, %d) (ID=%" PRIu64 ") failed with error %d", option, value, m_identifier.toUInt64(), m_socket->GetError());
    9697}
    9798
Note: See TracChangeset for help on using the changeset viewer.