commit aa34b030ee03b31a751e164c7ea5b6131be8ac40
parent d658340373b67bd962b751b7d04bfd7bcb52aba0
Author: Yersa Nordman <yersa@finwo.nl>
Date: Thu, 3 Aug 2023 02:00:29 +0200
Remove debug prints from lib
Diffstat:
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -29,7 +29,7 @@ void onTick(struct fnet_ev *ev) {
int cnt = *((int*)ev->udata);
fnet_write(ev->connection, &((struct buf){
- .len = strlen(data),
+ .len = strlen(data) + 1,
.data = data,
}));
diff --git a/src/fnet.c b/src/fnet.c
@@ -227,7 +227,7 @@ struct fnet_t * fnet_listen(const char *address, uint16_t port, const struct fne
continue;
}
- printf("Listen socket added to epfd\n");
+ /* printf("Listen socket added to epfd\n"); */
conn->epev[conn->nfds - 1] = epev;
}
}
@@ -309,7 +309,7 @@ struct fnet_t * fnet_connect(const char *address, uint16_t port, const struct fn
return NULL;
}
- fprintf(stderr, "Addresses: %d\n", naddrs);
+ /* fprintf(stderr, "Addresses: %d\n", naddrs); */
struct epoll_event *epev;
addrinfo = addrs;
@@ -664,7 +664,7 @@ FNET_RETURNCODE fnet_main() {
// Sleep if no epoll
if (!epfd) {
- printf("No poll, do tick\n");
+ /* printf("No poll, do tick\n"); */
ttime += 1000;
usleep(tdiff * 1000);
}
diff --git a/test.c b/test.c
@@ -30,7 +30,7 @@ void onTick(struct fnet_ev *ev) {
int cnt = *((int*)ev->udata);
fnet_write(ev->connection, &((struct buf){
- .len = strlen(data),
+ .len = strlen(data) + 1,
.data = data,
}));