Improve commenting and error checking
This commit is contained in:
+2
-4
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user