diff options
Diffstat (limited to 'main/tcp_server.c')
-rw-r--r-- | main/tcp_server.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/main/tcp_server.c b/main/tcp_server.c index 434f014..2ee7e51 100644 --- a/main/tcp_server.c +++ b/main/tcp_server.c @@ -130,7 +130,7 @@ static void handle_set_cmd( { if (false) {} -#define STATE_PARAM(ty, attr) \ +#define STATE_PARAM(ty, attr, ...) \ else if (!strcmp_(key, #attr)) { \ handle_ ## ty ## _option(#attr, sockbuf, &ws_params->state. attr); \ } @@ -147,7 +147,7 @@ static void handle_set_cmd( static void print_uint32_t(sockbuf_t* sockbuf, const char* attr, uint32_t val) { char buf[128]; - snprintf(buf, sizeof(buf), "%s: %d :: uint32_t\n", attr, val); + snprintf(buf, sizeof(buf), "%s: %ld :: uint32_t\n", attr, val); sockbuf_write(sockbuf, buf); } @@ -174,7 +174,7 @@ static void print_int(sockbuf_t* sockbuf, const char* attr, int val) static void handle_print_cmd(sockbuf_t* sockbuf, ws_params_t* ws_params) { -#define STATE_PARAM(ty, attr) \ +#define STATE_PARAM(ty, attr, ...) \ print_ ## ty ( sockbuf, #attr, ws_params->state. attr ); #include "state_params.i" #undef STATE_PARAM @@ -215,8 +215,6 @@ portTASK_FUNCTION(tcp_server, params) { ws_params_t* ws_params = (ws_params_t*) params; - wifi_init_station("Wort", "JoshIsBau5"); - int s = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); |