net: http: allow HTTP_NETWORK_TIMEOUT to be configured
Currently, the HTTP_NETWORK_TIMEOUT setting is hard-coded as 20 seconds. Not every application may want to wait that long, so let's change this to a CONFIG option: CONFIG_HTTP_CLIENT_NETWORK_TIMEOUT NOTE: This also removes HTTP_NETWORK_TIMEOUT from the public http.h include file. It was not being used externally to HTTP client sources. Signed-off-by: Michael Scott <michael.scott@linaro.org>
This commit is contained in:
parent
40e669e798
commit
fe84d4f7dd
3 changed files with 11 additions and 3 deletions
|
@ -49,6 +49,9 @@
|
|||
#define HTTP_CONTENT_TYPE "Content-Type: "
|
||||
#define HTTP_CONT_LEN_SIZE 64
|
||||
|
||||
/* Default network activity timeout in seconds */
|
||||
#define HTTP_NETWORK_TIMEOUT K_SECONDS(CONFIG_HTTP_CLIENT_NETWORK_TIMEOUT)
|
||||
|
||||
struct waiter {
|
||||
struct http_client_ctx *ctx;
|
||||
struct k_sem wait;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue