add: file sending capability

This commit is contained in:
Tobias Reisinger 2020-05-31 02:07:25 +02:00
parent 6178ef3c7b
commit 760cec9a20
18 changed files with 79 additions and 53 deletions

View file

@ -105,8 +105,10 @@ send_udp_broadcast(const char *addr, uint16_t port, void *message, size_t length
}
void
api_v1_controllers_discover_POST(struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
api_v1_controllers_discover_POST(struct mg_connection *nc, struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response)
{
(void)nc;
(void)hm;
int discover_server_socket = bind_tcp_server("0.0.0.0", "0", 20);
int discover_server_port = get_server_port(discover_server_socket);
@ -303,5 +305,5 @@ api_v1_controllers_discover_POST(struct http_message *hm, endpoint_args_t *args,
}
controller_free_list(known_controllers);
api_v1_controllers_GET(hm, args, response);
api_v1_controllers_GET(nc, hm, args, response);
}