diff options
author | Ian Moffett <ian@osmora.org> | 2024-09-29 22:38:43 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-09-29 22:38:43 -0400 |
commit | 73ead92c2d37d5d091992ef617c4abdfe9907a18 (patch) | |
tree | 1b689727607d72e525cee5bd298367aadc293615 /ostp.d/init/main.c | |
parent | 788b1308e86320882245159540ef0a489209bcf1 (diff) |
project: Massive fixups
- Fix client handling
- Add multithreading
- Fixup bad values
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'ostp.d/init/main.c')
-rw-r--r-- | ostp.d/init/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ostp.d/init/main.c b/ostp.d/init/main.c index 08e020e..9b2a836 100644 --- a/ostp.d/init/main.c +++ b/ostp.d/init/main.c @@ -33,7 +33,7 @@ #include <stdio.h> static int -blah(struct ostp_session *s, const char *buf, size_t len) +handle_data(struct ostp_client *s, const char *buf, size_t len) { printf("Got data!\n"); return 0; @@ -43,16 +43,15 @@ int main(void) { struct ostp_listener l; - struct ostp_session s; int error; listener_init(&l); - l.on_recv = blah; + l.on_recv = handle_data; - if ((error = listener_bind(&s, &l)) < 0) { + if ((error = listener_bind(&l)) < 0) { return error; } - if ((error = listener_poll(&s, &l)) < 0) { + if ((error = listener_poll(&l)) < 0) { return error; } |