Improve commenting and error checking

This commit is contained in:
2023-02-02 01:14:29 -06:00
parent 638fcd3fe2
commit 35cc588ae9
3 changed files with 23 additions and 18 deletions
+2 -4
View File
@@ -17,6 +17,7 @@ Client client_new() {
void client_connect(Client client) {
client->sdk_conn = connection_new(0, 0, 30030, "192.168.2.1");
// TODO: This should probably use the source IP in the response body
client->dev_conn = connection_new(10010, "192.168.2.24", 20020, "192.168.2.1");
set_sdk_connection(client, CONNECTION_WIFI_AP, 0, 10010);
@@ -24,10 +25,7 @@ void client_connect(Client client) {
void poll_message(Client client, union Message* resp) {
memset(resp, 0, sizeof(union Message));
struct Connection* conn = connection_poll_ready(client);
if(conn)
connection_read(conn, resp);
connection_read(conn, resp);
}