Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
typo
  • Loading branch information
Links2004 committed Nov 25, 2015
1 parent 680c733 commit 3b6512e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libraries/ESP8266httpClient/src/ESP8266httpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ httpClient::httpClient() {
_tcp = NULL;
_tcps = NULL;

_port = 0;

_reuse = false;
_https = false;

_headerKeysCount = 0;
_currentHeaders = NULL;
Expand Down Expand Up @@ -345,7 +348,7 @@ int httpClient::writeToStream(Stream * stream) {
DEBUG_HTTPCLIENT("[HTTP-Client][writeToStream] connection closed or file end (written: %d).\n", bytesWritten);

if(_size && _size != bytesWritten) {
DEBUG_HTTPCLIENT("[HTTP-Client][writeToStream] bytesWritten %d and size %d missmatch!.\n", bytesWritten, _size);
DEBUG_HTTPCLIENT("[HTTP-Client][writeToStream] bytesWritten %d and size %d mismatch!.\n", bytesWritten, _size);
}

end();
Expand All @@ -362,7 +365,7 @@ String httpClient::getString(void) {
if(_size) {
// try to reserve needed memmory
if(!sstring.reserve((_size + 1))) {
DEBUG_HTTPCLIENT("[HTTP-Client][getString] too less memory to resive as string! need: %d\n", (_size + 1));
DEBUG_HTTPCLIENT("[HTTP-Client][getString] too less memory to reserve as string! need: %d\n", (_size + 1));
return String("--too less memory--");
}
}
Expand Down Expand Up @@ -511,7 +514,7 @@ bool httpClient::sendHeader(const char * type) {
}
header += "\r\n" + _Headers + "\r\n";

return _tcp->write(header.c_str(), header.length());
return (_tcp->write(header.c_str(), header.length()) == header.length());
}

/**
Expand Down

0 comments on commit 3b6512e

Please sign in to comment.