Skip to content

Commit

Permalink
Blocked setsockopt/ioctl imp on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed Sep 14, 2017
1 parent 4cb5242 commit 7d6c883
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions srtcore/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,22 +304,25 @@ void CChannel::setIpToS(int tos)

int CChannel::ioctlQuery(int type) const
{
#ifdef unix
int value = 0;
int res = ::ioctl(m_iSocket, type, &value);
if ( res == -1 )
return -1;

return value;
if ( res != -1 )
return value;
#endif
return -1;
}

int CChannel::sockoptQuery(int level, int option) const
{
#ifdef unix
int value = 0;
socklen_t len = sizeof (int);
int res = ::getsockopt(m_iSocket, level, option, &value, &len);
if ( res == -1 )
return -1;
return value;
if ( res != -1 )
return value;
#endif
return -1;
}

void CChannel::getSockAddr(sockaddr* addr) const
Expand Down

0 comments on commit 7d6c883

Please sign in to comment.