fnet.c

Simple C networking library
git clone git://git.finwo.net/lib/fnet.c
Log | Files | Refs | README

commit f9d215b16010ccff5700f00ed43a01d40f9f3e0e
parent d97a639db1807cdb6b8af1e76e39b00dcccd7a8c
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Thu,  7 Dec 2023 21:28:15 +0100

Disable debug prints

Diffstat:
Msrc/fnet.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/fnet.c b/src/fnet.c @@ -475,7 +475,7 @@ FNET_RETURNCODE fnet_process(const struct fnet_t *connection) { buf_append(rbuf, tmp_buf, tmp_n); } while(tmp_n == BUFSIZ); - printf("Received %d bytes\n", rbuf->len); + /* printf("Received %d bytes\n", rbuf->len); */ if (rbuf->len < 0) { if (errno == EAGAIN) continue; @@ -506,7 +506,7 @@ FNET_RETURNCODE fnet_process(const struct fnet_t *connection) { } if (conn->ext.status & FNET_STATUS_LISTENING) { - printf("Processing %d listening fds\n", conn->nfds); + /* printf("Processing %d listening fds\n", conn->nfds); */ for ( i = 0 ; i < conn->nfds ; i++ ) { nfd = accept(conn->fds[i], (struct sockaddr *)&addr, &addrlen); @@ -732,16 +732,16 @@ FNET_RETURNCODE fnet_main() { struct epoll_event events[8]; - printf("Epoll enabled: %s\n", epfd ? "yes" : "no"); + /* printf("Epoll enabled: %s\n", epfd ? "yes" : "no"); */ while(runners) { // Do the actual processing if (epfd) { ev_count = epoll_wait(epfd, events, 8, tdiff); - if (ev_count) { - printf("New events: %d\n", ev_count); - } + /* if (ev_count) { */ + /* printf("New events: %d\n", ev_count); */ + /* } */ for( i = 0 ; i < ev_count ; i++ ) { ret = fnet_process((struct fnet_t *)events[i].data.ptr); if (ret) return ret; @@ -770,7 +770,7 @@ FNET_RETURNCODE fnet_main() { } } - printf("fnet_main finished\n"); + /* printf("fnet_main finished\n"); */ return FNET_RETURNCODE_OK; }