From f2be5d3144653d3541c0f1b181633008ee9aa8bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Sep 2024 12:47:55 -0400 Subject: [PATCH 1/2] Update main.c change to 10 sec delay after restart rpitx --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index dfb3e8677..4049ba6f4 100644 --- a/main.c +++ b/main.c @@ -1822,7 +1822,7 @@ void get_tlm_fox() { error = 1; FILE * rpitx_restartf2 = popen("sudo systemctl restart rpitx", "r"); pclose(rpitx_restartf2); - sleep(5); // sleep if socket connection refused + sleep(10); // was 5 // sleep if socket connection refused // try again error = 0; @@ -1848,7 +1848,7 @@ void get_tlm_fox() { error = 1; FILE * rpitx_restartf = popen("sudo systemctl restart rpitx", "r"); pclose(rpitx_restartf); - sleep(5); // sleep if socket connection refused + sleep(10); // was 5 // sleep if socket connection refused } } if (error == 1) From de0e5d8c54a4a7af6d21d0c0f96c7883da48e677 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Sep 2024 12:52:20 -0400 Subject: [PATCH 2/2] Update main.c don't restart rpitx --- main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 4049ba6f4..a4822cda6 100644 --- a/main.c +++ b/main.c @@ -1820,9 +1820,9 @@ void get_tlm_fox() { printf("\nConnection Failed \n"); printf("Error: %s restarting rpitx\n", strerror(errno)); error = 1; - FILE * rpitx_restartf2 = popen("sudo systemctl restart rpitx", "r"); - pclose(rpitx_restartf2); - sleep(10); // was 5 // sleep if socket connection refused +// FILE * rpitx_restartf2 = popen("sudo systemctl restart rpitx", "r"); +// pclose(rpitx_restartf2); +// sleep(10); // was 5 // sleep if socket connection refused // try again error = 0; @@ -1846,9 +1846,9 @@ void get_tlm_fox() { printf("\nConnection Failed \n"); printf("Error: %s restarting rpitx\n", strerror(errno)); error = 1; - FILE * rpitx_restartf = popen("sudo systemctl restart rpitx", "r"); - pclose(rpitx_restartf); - sleep(10); // was 5 // sleep if socket connection refused +// FILE * rpitx_restartf = popen("sudo systemctl restart rpitx", "r"); +// pclose(rpitx_restartf); +// sleep(10); // was 5 // sleep if socket connection refused } } if (error == 1)