when auth is needed, try command again before dying.
parent
0346aab075
commit
084e2a8b8f
|
@ -340,8 +340,19 @@ int RtspThread::run()
|
|||
message = "OPTIONS "+mUrl+" RTSP/1.0\r\n";
|
||||
if ( !sendCommand( message ) )
|
||||
return( -1 );
|
||||
if ( !recvResponse( response ) )
|
||||
return( -1 );
|
||||
|
||||
// A negative return here may indicate auth failure, but we will have setup the auth mechanisms so we need to retry.
|
||||
if ( !recvResponse( response ) ) {
|
||||
if ( mNeedAuth ) {
|
||||
Debug( 2, "Resending OPTIONS due to possible auth requirement" );
|
||||
if ( !sendCommand( message ) )
|
||||
return( -1 );
|
||||
if ( !recvResponse( response ) )
|
||||
return( -1 );
|
||||
} else {
|
||||
return( -1 );
|
||||
}
|
||||
} // end if failed response maybe due to auth
|
||||
|
||||
char publicLine[256] = "";
|
||||
StringVector lines = split( response, "\r\n" );
|
||||
|
|
Loading…
Reference in New Issue