diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-17 12:11:37 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-17 12:11:37 +0200 |
commit | 42bf616eac96eba1846c64123a4b3822061b418c (patch) | |
tree | ef9924ee14b593d25c3cf93170fc7977e25dd502 /shared/test.c | |
parent | a8ec533f4e548601e283cee628aaf5ffc1e7d662 (diff) |
update naming scheme in protocol.{c,h}
Diffstat (limited to 'shared/test.c')
-rw-r--r-- | shared/test.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/shared/test.c b/shared/test.c index 588cd16..f9d4bbc 100644 --- a/shared/test.c +++ b/shared/test.c @@ -7,7 +7,7 @@ #include "protocol.h" -void ws_protocol_res_last_records(ws_s_protocol_parsed_cmd* parsed_cmd, ws_s_protocol_response* response) { +void ws_protocol_res_last_records(ws_s_protocol_parsed_req_cmd* parsed_cmd, ws_s_protocol_res* response) { const char* response_text = "" "id,temperature,humidity,atmospheric_pressure\n" "10dc,2f,c5,7f\n" @@ -34,17 +34,15 @@ int main() { term.c_cc[VMIN] = 1; tcsetattr(STDIN_FILENO, 0, &term); - ws_s_protocol_parser_state* parser1 = ws_protocol_parser_alloc(); + ws_s_protocol_req_parser_state* parser1 = ws_protocol_req_parser_alloc(); - for(;;) { - fflush(stdout); + fflush(stdout); - char byte; - while(read(STDIN_FILENO, &byte, 1) > 0) - ws_protocol_parse_byte(parser1, byte); - } + char byte; + while(read(STDIN_FILENO, &byte, 1) > 0) + ws_protocol_parse_req_byte(parser1, byte); - ws_protocol_parser_free(parser1); + ws_protocol_req_parser_free(parser1); parser1 = NULL; return 0; |