updated client_settings.php; adding option for unsfae tls, updated client_backend => changed a few error messages

This commit is contained in:
jakani24
2024-02-25 09:56:05 +01:00
parent 4a7f4fe746
commit 7e5ef66f6c
26 changed files with 233 additions and 523 deletions

View File

@@ -29,7 +29,7 @@ int update_db(const char* folder_path) {
strcat_s(output_path, 295, "\\");
strcat_s(output_path, 295, file_name);
printf("%s\n", url);
int res = download_file_from_srv(url, output_path,0);
int res = download_file_from_srv(url, output_path,get_setting("communication:unsafe_tls"));
if (res != 0) {
return 10;
}
@@ -57,13 +57,13 @@ int update_settings(const char*settings_type) {
strcat_s(url, 1000, get_apikey(SECRETS));
int res = 1;
if (strcmp(settings_type, "settings") == 0)
res = download_file_from_srv(url, SETTINGS_DB,0);
res = download_file_from_srv(url, SETTINGS_DB, get_setting("communication:unsafe_tls"));
else if (strcmp(settings_type, "rtp_included") == 0)
res = download_file_from_srv(url, INCLUDED_FOLDERS,0);
res = download_file_from_srv(url, INCLUDED_FOLDERS, get_setting("communication:unsafe_tls"));
else if (strcmp(settings_type, "rtp_excluded") == 0)
res = download_file_from_srv(url, EXCLUDED_FOLDERS,0);
res = download_file_from_srv(url, EXCLUDED_FOLDERS, get_setting("communication:unsafe_tls"));
else if (strcmp(settings_type, "sched") == 0)
res = download_file_from_srv(url, SCHED_PATH,0);
res = download_file_from_srv(url, SCHED_PATH, get_setting("communication:unsafe_tls"));
//int res = 0;
if (res != 0) {
log(LOGLEVEL::ERR, "[update_settings()]: Error downloading settings database file from server", url, " ERROR:", res);