mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
fix compiling http_client and altcp_proxyconnect with gcc
This commit is contained in:
parent
fe3bb8bb78
commit
0ee0393936
@ -297,16 +297,6 @@ altcp_proxyconnect_lower_err(void *arg, err_t err)
|
|||||||
|
|
||||||
/* setup functions */
|
/* setup functions */
|
||||||
|
|
||||||
static void
|
|
||||||
altcp_proxyconnect_remove_callbacks(struct altcp_pcb *inner_conn)
|
|
||||||
{
|
|
||||||
altcp_arg(inner_conn, NULL);
|
|
||||||
altcp_recv(inner_conn, NULL);
|
|
||||||
altcp_sent(inner_conn, NULL);
|
|
||||||
altcp_err(inner_conn, NULL);
|
|
||||||
altcp_poll(inner_conn, NULL, inner_conn->pollinterval);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn)
|
altcp_proxyconnect_setup_callbacks(struct altcp_pcb *conn, struct altcp_pcb *inner_conn)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len
|
|||||||
memset(content_len_num, 0, sizeof(content_len_num));
|
memset(content_len_num, 0, sizeof(content_len_num));
|
||||||
if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) {
|
if (pbuf_copy_partial(p, content_len_num, content_len_num_len, content_len_hdr + 16) == content_len_num_len) {
|
||||||
int len = atoi(content_len_num);
|
int len = atoi(content_len_num);
|
||||||
if ((len >= 0) && (len < HTTPC_CONTENT_LEN_INVALID)) {
|
if ((len >= 0) && ((u32_t)len < HTTPC_CONTENT_LEN_INVALID)) {
|
||||||
*content_length = (u32_t)len;
|
*content_length = (u32_t)len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -571,10 +571,9 @@ httpc_init_connection_common(httpc_state_t **connection, const httpc_connection_
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup httpc
|
|
||||||
* Initialize the connection struct
|
* Initialize the connection struct
|
||||||
*/
|
*/
|
||||||
err_t
|
static err_t
|
||||||
httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name,
|
httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *settings, const char* server_name,
|
||||||
u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg)
|
u16_t server_port, const char* uri, altcp_recv_fn recv_fn, void* callback_arg)
|
||||||
{
|
{
|
||||||
@ -583,10 +582,9 @@ httpc_init_connection(httpc_state_t **connection, const httpc_connection_t *sett
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ingroup httpc
|
|
||||||
* Initialize the connection struct (from IP address)
|
* Initialize the connection struct (from IP address)
|
||||||
*/
|
*/
|
||||||
err_t
|
static err_t
|
||||||
httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings,
|
httpc_init_connection_addr(httpc_state_t **connection, const httpc_connection_t *settings,
|
||||||
const ip_addr_t* server_addr, u16_t server_port, const char* uri,
|
const ip_addr_t* server_addr, u16_t server_port, const char* uri,
|
||||||
altcp_recv_fn recv_fn, void* callback_arg)
|
altcp_recv_fn recv_fn, void* callback_arg)
|
||||||
|
@ -54,6 +54,7 @@ struct altcp_proxyconnect_config {
|
|||||||
|
|
||||||
|
|
||||||
struct altcp_pcb *altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb);
|
struct altcp_pcb *altcp_proxyconnect_new(struct altcp_proxyconnect_config *config, struct altcp_pcb *inner_pcb);
|
||||||
|
struct altcp_pcb *altcp_proxyconnect_new_tcp(struct altcp_proxyconnect_config *config, u8_t ip_type);
|
||||||
|
|
||||||
struct altcp_pcb *altcp_proxyconnect_alloc(void *arg, u8_t ip_type);
|
struct altcp_pcb *altcp_proxyconnect_alloc(void *arg, u8_t ip_type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user