Skip to content

Commit

Permalink
Fix compile now EthernetClient == is overloaded
Browse files Browse the repository at this point in the history
Remove comparison of m_client against NULL as this causes a compilation
error since arduino/Arduino@ca37de4.
Also initialize m_client with MAX_SOCK_NUMBER to make boolean test of
m_client work correctly.
  • Loading branch information
ribbons committed Jan 1, 2014
1 parent 2274271 commit 3125b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WebServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class WebServer: public Print

WebServer::WebServer(const char *urlPrefix, int port) :
m_server(port),
m_client(255),
m_client(MAX_SOCK_NUM),
m_urlPrefix(urlPrefix),
m_pushbackDepth(0),
m_contentLength(0),
Expand Down Expand Up @@ -726,7 +726,7 @@ void WebServer::httpSeeOther(const char *otherURL)

int WebServer::read()
{
if (m_client == NULL)
if (!m_client)
return -1;

if (m_pushbackDepth == 0)
Expand Down

0 comments on commit 3125b21

Please sign in to comment.