#522 OPAL calls OpalManager::OnMediaFailed while closing source media stream (OPAL trunk)

Development_Branch
closed-fixed
nobody
None
5
2014-10-10
2014-08-14
No
  1. OPAL receives SIP ReINVITE with a HOLD and closes source media stream.
  2. Media patch thread receives a socket error in the OpalRTPSession::ReadRawPDU and calls

m_connection.OnMediaFailed(m_sessionId, true);

Discussion

  • Valeriy V. Argunov

    I see that the PChannel::Interrupted error code exists.
    It seems like PTLIB should use it for this case, but I see that OPAL detects "Miscellaneous" code there.

     
  • Valeriy V. Argunov

    In the PChannel::ConvertOSError:

    libcReturnValue is -1 and (osError = os_errno()) returns 10054.

     
  • Valeriy V. Argunov

    Just checked again: OPAL receives 10054 before the OnHold() processing.
    I'll try to find the reason.

     
  • Valeriy V. Argunov

    The real reason for this bug:

    WSARecvFrom terminates with 10054 if socket receives ICMP port unreachable.
    I see that OPAL checks the socket for the PChannel::Unavailable code, but I don't see where it can set that error code on the socket.

     
  • Valeriy V. Argunov

    PSocket::ConvertOSError could set Unavailable code, but it doesn't check for the 10054 code:

      switch (lastErrorNumber[group]) {
        case ECONNRESET :
        case ECONNREFUSED :
        case EHOSTUNREACH :
        case ENETUNREACH :
          SetErrorValues(Unavailable, lastErrorNumber[group], group);
          break;
    
        case EMSGSIZE :
          return SetErrorValues(BufferTooSmall, lastErrorNumber[group], group);
      }
    
     
  • Valeriy V. Argunov

    In PChannel::ConvertOSError from the "win32.cxx":

        case -1 :
          if ((osError = os_errno()) != 0)
            break;
          // Do next case
    
        case -2 :
            ....
            case WSAECONNRESET :
              osError = ECONNRESET;
              break;
            ....
    

    osError = os_errno() gets 10054 and ignores "case -2".

     
  • Valeriy V. Argunov

    Patch #285 fixes this.

     
  • Robert Jongbloed

    • status: open --> closed-fixed
     
  • Robert Jongbloed

    Fixed At revision: 32954

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks