From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [36.81.65.188]) by gnuweeb.org (Postfix) with ESMTPSA id 2CA707E389; Fri, 8 Jul 2022 12:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1657282270; bh=h/7tDmOF6RrQveyR/seMhsSNw4BCMsdpBWTypMdjl6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qyVXUZDL/Esh6MWu+GhRD4qkfWZuCQeWY7LTDTR3XzE8tdPZEXyJIOfCMtMDMekpd 3QeYhYtCfBHa93FC84txDlF1VLpuZ5SBwKWed6WWXAJIOHvHBtcKCFnr6gh6Rglgfp 61+73tT4faN22vzeKX0qNMQe7RzkR2+lqaQASt/FxXJ/SN6ZH7cNyB/OMPb9Go/Wi9 /Sw5Gkv/2Q/gT6CFngHawtwYa2+HiXXqTzHQ0eZtWRTJlDdD3t8XpkSymZ28ShwK9G rZSh5z0JTRo/6Z9NlXzbmCVbUPibZEvpUd9DnYGwF/u0Xkv5oNxf7fkVWj60fEZQun 7KdWP9qKUks7g== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Alviro Iskandar Setiawan , Arthur Lapz , Fernanda Ma'rouf , Sprite , Yonle Subject: [PATCH gwhttpd 12/14] gwhttpd: slc: Shut the SLC log up Date: Fri, 8 Jul 2022 19:10:23 +0700 Message-Id: <20220708121025.926162-13-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708121025.926162-1-ammarfaizi2@gnuweeb.org> References: <20220708121025.926162-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The SLC log will be very noisy, let's just get rid of them! Signed-off-by: Ammar Faizi --- 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