Add a client example program and move examples to the examples/ folder
This commit is contained in:
+4
-4
@@ -422,12 +422,12 @@ bool http_client_next_response(HTTP_Client *client,
|
||||
return true;
|
||||
}
|
||||
|
||||
void http_free_response(HTTP_Response *res)
|
||||
void http_free_response(HTTP_Response *response)
|
||||
{
|
||||
if (res == NULL || res->context == NULL)
|
||||
if (response == NULL || response->context == NULL)
|
||||
return;
|
||||
|
||||
HTTP_ClientConn *conn = (HTTP_ClientConn*) res->context;
|
||||
HTTP_ClientConn *conn = (HTTP_ClientConn*) response->context;
|
||||
|
||||
// Free the connection resources
|
||||
http_client_conn_free(conn);
|
||||
@@ -435,5 +435,5 @@ void http_free_response(HTTP_Response *res)
|
||||
conn->client->num_conns--;
|
||||
|
||||
// Mark response as freed
|
||||
res->context = NULL;
|
||||
response->context = NULL;
|
||||
}
|
||||
|
||||
+1
-1
@@ -151,4 +151,4 @@ bool http_client_next_response(HTTP_Client *client,
|
||||
|
||||
// Free a response object. You can't access its fields
|
||||
// again after this.
|
||||
void http_free_response(HTTP_Response *res);
|
||||
void http_free_response(HTTP_Response *response);
|
||||
|
||||
Reference in New Issue
Block a user