mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-23 08:45:22 +03:00
Define lwIP's s32/u32 to int (#8560)
* Define lwIP's s32/u32 to int s32/u32 were previously defined as long, but long can be 64 bits in host mode, so this commit reduces valgrind complaints and increase coherency. * some lads like to use `unsigned long` for 32 bits IPv4 addresses * fix lwIP's `sys_now()` return type * fix C declarations * merge upstream (lwip2) update on sys_now() definition * matching lwIP api (2/2) Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
This commit is contained in:
@ -186,7 +186,7 @@ T* slist_append_tail(T* head, T* item) {
|
||||
return head;
|
||||
}
|
||||
|
||||
long WiFiServer::_accept(tcp_pcb* apcb, long err) {
|
||||
err_t WiFiServer::_accept(tcp_pcb* apcb, err_t err) {
|
||||
(void) err;
|
||||
DEBUGV("WS:ac\r\n");
|
||||
|
||||
@ -212,7 +212,7 @@ void WiFiServer::_discard(ClientContext* client) {
|
||||
DEBUGV("WS:dis\r\n");
|
||||
}
|
||||
|
||||
long WiFiServer::_s_accept(void *arg, tcp_pcb* newpcb, long err) {
|
||||
err_t WiFiServer::_s_accept(void *arg, tcp_pcb* newpcb, err_t err) {
|
||||
return reinterpret_cast<WiFiServer*>(arg)->_accept(newpcb, err);
|
||||
}
|
||||
|
||||
|
@ -23,13 +23,14 @@
|
||||
#define wifiserver_h
|
||||
|
||||
extern "C" {
|
||||
#include "wl_definitions.h"
|
||||
#include <wl_definitions.h>
|
||||
|
||||
struct tcp_pcb;
|
||||
}
|
||||
|
||||
#include "Server.h"
|
||||
#include "IPAddress.h"
|
||||
#include <Server.h>
|
||||
#include <IPAddress.h>
|
||||
#include <lwip/err.h>
|
||||
|
||||
// lwIP-v2 backlog facility allows to keep memory safe by limiting the
|
||||
// maximum number of incoming *pending clients*. Default number of possibly
|
||||
@ -103,10 +104,10 @@ public:
|
||||
using ClientType = WiFiClient;
|
||||
|
||||
protected:
|
||||
long _accept(tcp_pcb* newpcb, long err);
|
||||
err_t _accept(tcp_pcb* newpcb, err_t err);
|
||||
void _discard(ClientContext* client);
|
||||
|
||||
static long _s_accept(void *arg, tcp_pcb* newpcb, long err);
|
||||
static err_t _s_accept(void *arg, tcp_pcb* newpcb, err_t err);
|
||||
static void _s_discard(void* server, ClientContext* ctx);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user