Skip to content

Commit

Permalink
[compat] fixed raise exeption.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nobu19800 committed Mar 11, 2022
1 parent 5fd709f commit b865b5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ext/transport/SSMTransport/SSMInPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ namespace RTC
if(!coil::stringTo(m_stream_id, stream_id_str.c_str()))
{
RTC_ERROR(("stream_id is invalid value"));
throw std::bad_alloc();
}

}
Expand Down
4 changes: 4 additions & 0 deletions src/ext/transport/SSMTransport/SSMOutPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,25 @@ namespace RTC
if(!coil::stringTo(m_stream_id, stream_id_str.c_str()))
{
RTC_ERROR(("stream_id is invalid value"));
throw std::bad_alloc();
}
std::string stream_size_str = prop.getProperty("ssm.stream_size", "0");
if(!coil::stringTo(m_stream_size, stream_size_str.c_str()))
{
RTC_ERROR(("stream_size is invalid value"));
throw std::bad_alloc();
}
std::string life_ssm_time_str = prop.getProperty("ssm.life_ssm_time", "5.0");
if(!coil::stringTo(m_life_ssm_time, life_ssm_time_str.c_str()))
{
RTC_ERROR(("life_ssm_time is invalid value"));
throw std::bad_alloc();
}
std::string cycle_ssm_time_str = prop.getProperty("ssm.cycle_ssm_time", "0.05");
if(!coil::stringTo(m_cycle_ssm_time, cycle_ssm_time_str.c_str()))
{
RTC_ERROR(("cycle_ssm_time is invalid value"));
throw std::bad_alloc();
}

if(m_stream_size > 0)
Expand Down

0 comments on commit b865b5d

Please sign in to comment.