diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-19 13:49:58 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-19 13:49:58 +0000 |
commit | 33b832979b2d01a865a25c9faefe6a3cee6e5dc2 (patch) | |
tree | 14b48449bb199cafd62a20a89e52d4afdf8ecfed /ext/socket/lib/socket.rb | |
parent | 121b6e064a1b167dddbdc271d503ff96e7deb83b (diff) |
* ext/socket/ancdata.c: Check buffer full and ignore MSG_TRUNC flag.
buffer fullness is more robust to detect the message is too big for
the buffer.
AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is
given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/lib/socket.rb')
-rw-r--r-- | ext/socket/lib/socket.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/socket/lib/socket.rb b/ext/socket/lib/socket.rb index 0240c2094e..31dc596d3e 100644 --- a/ext/socket/lib/socket.rb +++ b/ext/socket/lib/socket.rb @@ -415,7 +415,8 @@ class BasicSocket < IO # # _maxmesglen_ and _maxcontrollen_ can be nil. # In that case, the buffer will be grown until the message is not truncated. - # Internally, MSG_PEEK is used and MSG_TRUNC/MSG_CTRUNC are checked. + # Internally, MSG_PEEK is used. + # Buffer full and MSG_CTRUNC are checked for truncation. # # recvmsg can be used to implement recv_io as follows: # |