Skip to content

Commit

Permalink
Updates to work with proper release of Arduino 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amcewen committed Nov 30, 2011
1 parent 6e8d284 commit 222f718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int HttpClient::startRequest(const char* aServerName, uint16_t aServerPort, cons

if (iProxyPort)
{
if (!iClient->connect(iProxyAddress, iProxyPort))
if (!iClient->connect(iProxyAddress, iProxyPort) > 0)
{
#ifdef LOGGING
Serial.println("Proxy connection failed");
Expand All @@ -65,7 +65,7 @@ int HttpClient::startRequest(const char* aServerName, uint16_t aServerPort, cons
}
else
{
if (!iClient->connect(aServerName, aServerPort))
if (!iClient->connect(aServerName, aServerPort) > 0)
{
#ifdef LOGGING
Serial.println("Connection failed");
Expand All @@ -87,7 +87,7 @@ int HttpClient::startRequest(const IPAddress& aServerAddress, uint16_t aServerPo

if (iProxyPort)
{
if (!iClient->connect(iProxyAddress, iProxyPort))
if (!iClient->connect(iProxyAddress, iProxyPort) > 0)
{
#ifdef LOGGING
Serial.println("Proxy connection failed");
Expand All @@ -97,7 +97,7 @@ int HttpClient::startRequest(const IPAddress& aServerAddress, uint16_t aServerPo
}
else
{
if (!iClient->connect(aServerAddress, aServerPort))
if (!iClient->connect(aServerAddress, aServerPort) > 0)
{
#ifdef LOGGING
Serial.println("Connection failed");
Expand Down
1 change: 0 additions & 1 deletion HttpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ class HttpClient : public Client

// Inherited from Print
virtual size_t write(uint8_t aByte) { return iClient-> write(aByte); };
virtual size_t write(const char *aStr) { return iClient->write(aStr); };
virtual size_t write(const uint8_t *aBuffer, size_t aSize) { return iClient->write(aBuffer, aSize); };
// Inherited from Stream
virtual int available() { return iClient->available(); };
Expand Down

0 comments on commit 222f718

Please sign in to comment.