2021-08-21 Fred Gleason <fredg@paravelsystems.com>

* Added a 'SYSTEM.REALM_NAME' field to the database.
	* Incremented the database version to 353.
	* Added 'RDSystem::realmName()' and 'RDSystem::setREalmName()'
	methods.
	* Added a 'realm_name' member to the 'rd_system_settings' struct
	in the RivWebCApi library.
	* Added a 'Realm Name' control to the 'System-Wide Settings'
	dialog in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-08-21 13:32:28 -04:00
parent 83c35bfa6a
commit abe00acce8
13 changed files with 131 additions and 39 deletions

View File

@@ -63,6 +63,9 @@ static void XMLCALL __ListSystemSettingsElementEnd(void *data, const char *el)
struct xml_data *xml_data=(struct xml_data *)data;
struct rd_system_settings *system_settings=xml_data->system_settings;
if(strcasecmp(el,"realmName")==0){
strlcpy(system_settings->realm_name,xml_data->strbuf,256);
}
if(strcasecmp(el,"sampleRate")==0) {
sscanf(xml_data->strbuf,"%u",&system_settings->sample_rate);
}

View File

@@ -2,6 +2,7 @@
*
* Header for the List System Settings Rivendell Access Library
*
* (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
* (C) Copyright 2017 Todd Baker <bakert@rfa.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -22,6 +23,7 @@
#define RD_LISTSYSTEMSETTINGS_H
struct rd_system_settings {
char realm_name[257];
unsigned sample_rate;
int dup_cart_titles;
unsigned max_post_length;

View File

@@ -98,11 +98,18 @@ int main(int argc,char *argv[])
// List the Results
//
for(i=0;i<numrecs;i++) {
printf(" System Sample Rate : %u\n",system_settings[i].sample_rate);
printf(" Allow Duplicate Cart Titles : %d\n",system_settings[i].dup_cart_titles);
printf(" ISCI Cross Reference_Path : %s\n",system_settings[i].isci_xreference_path);
printf(" Maximum Remote Post Length : %u\n",system_settings[i].max_post_length);
printf(" Temporary Cart Group : %s\n",system_settings[i].temp_cart_group);
printf(" Realm Name : %s\n",
system_settings[i].realm_name);
printf(" System Sample Rate : %u\n",
system_settings[i].sample_rate);
printf(" Allow Duplicate Cart Titles : %d\n",
system_settings[i].dup_cart_titles);
printf(" ISCI Cross Reference_Path : %s\n",
system_settings[i].isci_xreference_path);
printf(" Maximum Remote Post Length : %u\n",
system_settings[i].max_post_length);
printf(" Temporary Cart Group : %s\n",
system_settings[i].temp_cart_group);
printf("\n");
}
@@ -193,11 +200,18 @@ int main(int argc,char *argv[])
// List the Results
//
for(i=0;i<numrecs;i++) {
printf(" System Sample Rate : %u\n",system_settings[i].sample_rate);
printf(" Allow Duplicate Cart Titles : %d\n",system_settings[i].dup_cart_titles);
printf(" ISCI Cross Reference_Path : %s\n",system_settings[i].isci_xreference_path);
printf(" Maximum Remote Post Length : %u\n",system_settings[i].max_post_length);
printf(" Temporary Cart Group : %s\n",system_settings[i].temp_cart_group);
printf(" Realm Name : %s\n",
system_settings[i].realm_name);
printf(" System Sample Rate : %u\n",
system_settings[i].sample_rate);
printf(" Allow Duplicate Cart Titles : %d\n",
system_settings[i].dup_cart_titles);
printf(" ISCI Cross Reference_Path : %s\n",
system_settings[i].isci_xreference_path);
printf(" Maximum Remote Post Length : %u\n",
system_settings[i].max_post_length);
printf(" Temporary Cart Group : %s\n",
system_settings[i].temp_cart_group);
printf("\n");
}