Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/wifi/esp8266-driver/ESP8266/ESP8266.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ const char *ESP8266::ip_addr(void)
return _ip_buffer;
}

const bool ESP8266::set_ip_addr(const char *ip, const char *gateway, const char *netmask)
bool ESP8266::set_ip_addr(const char *ip, const char *gateway, const char *netmask)
{
if (ip == nullptr || ip[0] == '\0') {
return false;
Expand Down Expand Up @@ -708,7 +708,6 @@ nsapi_size_or_error_t ESP8266::send(int id, const void *data, uint32_t amount)

nsapi_error_t ret = NSAPI_ERROR_DEVICE_ERROR;
int bytes_confirmed = 0;
constexpr unsigned int send_ack_retries = 3;

// +CIPSEND supports up to 2048 bytes at a time
// Data stream can be truncated
Expand Down Expand Up @@ -759,7 +758,7 @@ nsapi_size_or_error_t ESP8266::send(int id, const void *data, uint32_t amount)
} else if (_sock_i[id].proto == NSAPI_UDP) {
ret = NSAPI_ERROR_NO_MEMORY;
}
} else if (bytes_confirmed != amount && _sock_i[id].proto == NSAPI_UDP) {
} else if (bytes_confirmed != (int)amount && _sock_i[id].proto == NSAPI_UDP) {
tr_debug("send(): Error: confirmed %d bytes, but expected %d.", bytes_confirmed, amount);
ret = NSAPI_ERROR_DEVICE_ERROR;
} else {
Expand Down
2 changes: 1 addition & 1 deletion components/wifi/esp8266-driver/ESP8266/ESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class ESP8266 {
*
* @return true if operation was successful and flase otherwise
*/
const bool set_ip_addr(const char *ip, const char *gateway, const char *netmask);
bool set_ip_addr(const char *ip, const char *gateway, const char *netmask);

/**
* Get the MAC address of ESP8266
Expand Down