From 57d88d78898c57dc86030bd67d67472b5049bec1 Mon Sep 17 00:00:00 2001 From: BuGu <62454025+Z2Z-GuGu@users.noreply.github.com> Date: Thu, 20 Mar 2025 17:42:53 +0800 Subject: [PATCH] New products default to disabling mDNS --- .../main/lib/system_init/system_init.cpp | 22 ++++++++++--------- .../main/lib/system_init/system_init.h | 2 +- support/sg2002/kvm_system/main/src/main.cpp | 6 ++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/support/sg2002/kvm_system/main/lib/system_init/system_init.cpp b/support/sg2002/kvm_system/main/lib/system_init/system_init.cpp index bcb5c6d..e9b17f2 100644 --- a/support/sg2002/kvm_system/main/lib/system_init/system_init.cpp +++ b/support/sg2002/kvm_system/main/lib/system_init/system_init.cpp @@ -34,18 +34,20 @@ uint8_t get_hdmi_version() } } -void test_ue_detecte() +void Production_testing_patch(void) { - if (access("/tmp/S49kvmtest", F_OK) == 0){ - printf("ue patch test\n"); - if(get_hdmi_version() == 2){ - printf("ue_patch_state = 1;\n"); - kvm_oled_state.ue_patch_state = 1; - } else { - printf("ue_patch_state = 0;\n"); - kvm_oled_state.ue_patch_state = 0; - } + // Product UE version detecte + if(get_hdmi_version() == 2){ + printf("ue_patch_state = 1;\n"); + kvm_oled_state.ue_patch_state = 1; + } else { + printf("ue_patch_state = 0;\n"); + kvm_oled_state.ue_patch_state = 0; } + + // New products default to disabling mDNS functionality + system("rm -f /etc/init.d/S50ssdpd"); + system("sync"); } void new_app_init(void) diff --git a/support/sg2002/kvm_system/main/lib/system_init/system_init.h b/support/sg2002/kvm_system/main/lib/system_init/system_init.h index bb9c397..47959bf 100644 --- a/support/sg2002/kvm_system/main/lib/system_init/system_init.h +++ b/support/sg2002/kvm_system/main/lib/system_init/system_init.h @@ -4,6 +4,6 @@ void new_img_init(void); void new_app_init(void); -void test_ue_detecte(); +void Production_testing_patch(void); #endif // SYSTEM_INIT_H_ diff --git a/support/sg2002/kvm_system/main/src/main.cpp b/support/sg2002/kvm_system/main/src/main.cpp index 0e3145a..2bbcf61 100644 --- a/support/sg2002/kvm_system/main/src/main.cpp +++ b/support/sg2002/kvm_system/main/src/main.cpp @@ -196,7 +196,11 @@ int main(int argc, char* argv[]) new_app_init(); } - test_ue_detecte(); + // only for production testing + if (access("/tmp/S49kvmtest", F_OK) == 0){ + printf("Production testing patch\n"); + Production_testing_patch(); + } system("sync");