public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: GNU/Weeb Mailing List <[email protected]>
Cc: Ammar Faizi <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Arthur Lapz <[email protected]>,
	Fernanda Ma'rouf <[email protected]>,
	Sprite <[email protected]>, Yonle <[email protected]>
Subject: [PATCH gwhttpd 12/14] gwhttpd: slc: Shut the SLC log up
Date: Fri,  8 Jul 2022 19:10:23 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

The SLC log will be very noisy, let's just get rid of them!

Signed-off-by: Ammar Faizi <[email protected]>
---
 gwhttpd.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gwhttpd.cpp b/gwhttpd.cpp
index b62ed26..4a6db62 100644
--- a/gwhttpd.cpp
+++ b/gwhttpd.cpp
@@ -1895,7 +1895,7 @@ static int connect_tcp_sock(int fd, const char *addr, uint16_t port)
 	dst_addr.sin_port = htons(port);
 	dst_addr.sin_addr.s_addr = inet_addr(addr);
 
-	printf("SLC Connecting to %s:%u...\n", addr, port);
+	// printf("SLC Connecting to %s:%u...\n", addr, port);
 	err = connect(fd, (struct sockaddr *)&dst_addr, sizeof(dst_addr));
 	if (err < 0) {
 		err = errno;
@@ -1903,7 +1903,7 @@ static int connect_tcp_sock(int fd, const char *addr, uint16_t port)
 		return -err;
 	}
 	err = setup_socket(fd);
-	printf("SLC Connected!\n");
+	// printf("SLC Connected!\n");
 	return 0;
 }
 
@@ -1917,11 +1917,11 @@ static int recv_and_send(int fd_in, int fd_out, int *pipes, size_t len)
 	read_ret = splice(fd_in, NULL, pipes[1], NULL, len, fl);
 	if (unlikely(read_ret <= 0)) {
 		if (read_ret == 0) {
-			puts("fd_in is down");
+			// puts("fd_in is down");
 			return -ENETDOWN;
 		}
 		ret = errno;
-		perror("splice fd_in");
+		// perror("splice fd_in");
 		return -ret;
 	}
 
@@ -1929,11 +1929,11 @@ do_write:
 	write_ret = splice(pipes[0], NULL, fd_out, NULL, read_ret, fl);
 	if (unlikely(write_ret <= 0)) {
 		if (write_ret == 0) {
-			puts("fd_out is down");
+			// puts("fd_out is down");
 			return -ENETDOWN;
 		}
 		ret = errno;
-		perror("splice fd_out");
+		// perror("splice fd_out");
 		return -ret;
 	}
 
@@ -2062,7 +2062,7 @@ do_recv:
 	ret = recv(fd_circuit, &pkt, sizeof(pkt), 0);
 	if (unlikely(ret <= 0)) {
 		if (ret == 0) {
-			puts("Server has been disconnected!");
+			puts("SLC Server has been disconnected!");
 			return -ENETDOWN;
 		}
 		err = errno;
@@ -2137,7 +2137,7 @@ repeat:
 	if (atomic_load(&g_slc_stop))
 		return ret;
 
-	puts("Sleeing for 3 seconds...");
+	puts("SLC: Sleeping for 3 seconds before reconnecting...");
 	sleep(3);
 	goto repeat;
 }
-- 
Ammar Faizi


  parent reply	other threads:[~2022-07-08 12:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 12:10 [PATCH gwhttpd 00/14] gwhttpd updates Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 01/14] gwhttpd: Do an early return when `parse_http_header()` fails Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 02/14] gwhttpd: Don't print any error when mlock fails Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 03/14] gwhttpd: Replace `send_error_and_close()` with `send_http_error()` Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 04/14] gwhttpd: Add log in the interrupt handler Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 05/14] gwhttpd: Refactor HTTP header parser Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 06/14] gwhttpd: Avoid endless busy spinning on `send()` Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 07/14] Makefile: Add "make clean" command Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 08/14] gwhttpd: Skip interrupt error from `epoll_wait()` Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 09/14] gwhttpd: Add directory listing and download file support Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 10/14] gwhttpd: Add command line options Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 11/14] gwhttpd: Add SLC support Ammar Faizi
2022-07-08 12:10 ` Ammar Faizi [this message]
2022-07-08 12:10 ` [PATCH gwhttpd 13/14] gwhttpd: Fix 403 HTTP error when accessing an empty file Ammar Faizi
2022-07-08 12:10 ` [PATCH gwhttpd 14/14] gwhttpd: Add connecting log for SLC Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox