From 060a47f88aeff1576814c5fbd59bcf8ff240bc12 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 22 Mar 2017 22:57:50 +0100 Subject: [PATCH] Add altcp to Filelists.mk Some compile fixes in altcp_tcp.c and httpd.c --- src/Filelists.mk | 2 ++ src/apps/httpd/httpd.c | 4 ++-- src/core/altcp_tcp.c | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Filelists.mk b/src/Filelists.mk index cfa34466..020edad9 100644 --- a/src/Filelists.mk +++ b/src/Filelists.mk @@ -42,6 +42,8 @@ COREFILES=$(LWIPDIR)/core/init.c \ $(LWIPDIR)/core/raw.c \ $(LWIPDIR)/core/stats.c \ $(LWIPDIR)/core/sys.c \ + $(LWIPDIR)/core/altcp.c \ + $(LWIPDIR)/core/altcp_tcp.c \ $(LWIPDIR)/core/tcp.c \ $(LWIPDIR)/core/tcp_in.c \ $(LWIPDIR)/core/tcp_out.c \ diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index d88ed675..9d5280aa 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -1203,7 +1203,7 @@ http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) * have to split the insert string between two tcp_write operations. */ /* How much data could we send? */ - len = tcp_sndbuf(pcb); + len = altcp_sndbuf(pcb); /* Do we have remaining data to send before parsing more? */ if(ssi->parsed > hs->file) { @@ -1217,7 +1217,7 @@ http_send_data_ssi(struct altcp_pcb *pcb, struct http_state *hs) } /* If the send buffer is full, return now. */ - if(tcp_sndbuf(pcb) == 0) { + if(altcp_sndbuf(pcb) == 0) { return data_to_send; } } diff --git a/src/core/altcp_tcp.c b/src/core/altcp_tcp.c index 2cb28986..bcd6e934 100644 --- a/src/core/altcp_tcp.c +++ b/src/core/altcp_tcp.c @@ -46,6 +46,7 @@ #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ #include "lwip/altcp.h" +#include "lwip/altcp_tcp.h" #include "lwip/priv/altcp_priv.h" #include "lwip/tcp.h" #include "lwip/mem.h" @@ -343,7 +344,7 @@ altcp_tcp_dealloc(struct altcp_pcb *conn) /* no private state to clean up */ } -err_t +static err_t altcp_tcp_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u16_t *port) { if (conn) { @@ -354,7 +355,7 @@ altcp_tcp_get_tcp_addrinfo(struct altcp_pcb *conn, int local, ip_addr_t *addr, u } #ifdef LWIP_DEBUG -enum tcp_state +static enum tcp_state altcp_tcp_dbg_get_tcp_state(struct altcp_pcb *conn) { if (conn) {