Skip to content

Commit 9296f1d

Browse files
committed
Fixing bug in Ethernet (recv() in socket.cpp). (Paul Stoffregen)
http://code.google.com/p/arduino/issues/detail?id=670
1 parent b35e76a commit 9296f1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Ethernet/utility/socket.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ uint16_t recv(SOCKET s, uint8_t *buf, uint16_t len)
151151
{
152152
// No data available.
153153
uint8_t status = W5100.readSnSR(s);
154-
if ( s == SnSR::LISTEN || s == SnSR::CLOSED || s == SnSR::CLOSE_WAIT )
154+
if ( status == SnSR::LISTEN || status == SnSR::CLOSED || status == SnSR::CLOSE_WAIT )
155155
{
156156
// The remote end has closed its side of the connection, so this is the eof state
157157
ret = 0;

0 commit comments

Comments
 (0)