Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions daemon/main/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,10 +1004,11 @@ void Options::InitServers()

const char* ncipher = GetOption(BString<100>("Server%i.Cipher", n));
const char* nconnections = GetOption(BString<100>("Server%i.Connections", n));
const char* npipelinedepth = GetOption(BString<100>("Server%i.PipelineDepth", n));
const char* nretention = GetOption(BString<100>("Server%i.Retention", n));

bool definition = nactive || nname || nlevel || ngroup || nhost || nport || noptional ||
nusername || npassword || nconnections || njoingroup || ntls || ncipher || nretention;
nusername || npassword || nconnections || npipelinedepth || njoingroup || ntls || ncipher || nretention;
bool completed = nhost && nport && nconnections;

if (!definition)
Expand All @@ -1026,6 +1027,7 @@ void Options::InitServers()
nusername, npassword,
joinGroup, tls, ncipher,
nconnections ? atoi(nconnections) : 1,
npipelinedepth ? atoi(npipelinedepth) : 2,
nretention ? atoi(nretention) : 0,
nlevel ? atoi(nlevel) : 0,
ngroup ? atoi(ngroup) : 0,
Expand Down Expand Up @@ -1533,10 +1535,10 @@ bool Options::ValidateOptionName(const char* optname, const char* optvalue)
!strcasecmp(p, ".port") || !strcasecmp(p, ".username") ||
!strcasecmp(p, ".password") || !strcasecmp(p, ".joingroup") ||
!strcasecmp(p, ".encryption") || !strcasecmp(p, ".connections") ||
!strcasecmp(p, ".cipher") || !strcasecmp(p, ".group") ||
!strcasecmp(p, ".retention") || !strcasecmp(p, ".optional") ||
!strcasecmp(p, ".notes") || !strcasecmp(p, ".ipversion") ||
!strcasecmp(p, ".certverification")))
!strcasecmp(p, ".pipelinedepth") || !strcasecmp(p, ".cipher") ||
!strcasecmp(p, ".group") || !strcasecmp(p, ".retention") ||
!strcasecmp(p, ".optional") || !strcasecmp(p, ".notes") ||
!strcasecmp(p, ".ipversion") || !strcasecmp(p, ".certverification")))
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/main/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class Options
public:
virtual void AddNewsServer(int id, bool active, const char* name, const char* host,
int port, int ipVersion, const char* user, const char* pass, bool joinGroup,
bool tls, const char* cipher, int maxConnections, int retention,
bool tls, const char* cipher, int maxConnections, int pipelineDepth, int retention,
int level, int group, bool optional, unsigned int certVerificationfLevel) = 0;
virtual void AddFeed(
[[maybe_unused]] int id,
Expand Down
6 changes: 3 additions & 3 deletions daemon/main/nzbget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class NZBGet : public Options::Extender
// Options::Extender
void AddNewsServer(int id, bool active, const char* name, const char* host,
int port, int ipVersion, const char* user, const char* pass, bool joinGroup,
bool tls, const char* cipher, int maxConnections, int retention,
bool tls, const char* cipher, int maxConnections, int pipelineDepth, int retention,
int level, int group, bool optional, unsigned int certVerificationfLevel) override;
void AddFeed(int id, const char* name, const char* url, int interval,
const char* filter, bool backlog, bool pauseNzb, const char* category,
Expand Down Expand Up @@ -1106,11 +1106,11 @@ void NZBGet::Daemonize()

void NZBGet::AddNewsServer(int id, bool active, const char* name, const char* host,
int port, int ipVersion, const char* user, const char* pass, bool joinGroup, bool tls,
const char* cipher, int maxConnections, int retention, int level, int group, bool optional,
const char* cipher, int maxConnections, int pipelineDepth, int retention, int level, int group, bool optional,
unsigned int certVerificationfLevel)
{
m_serverPool->AddServer(std::make_unique<NewsServer>(id, active, name, host, port, ipVersion, user, pass, joinGroup,
tls, cipher, maxConnections, retention, level, group, optional, certVerificationfLevel));
tls, cipher, maxConnections, pipelineDepth, retention, level, group, optional, certVerificationfLevel));
}

void NZBGet::AddFeed(int id, const char* name, const char* url, int interval, const char* filter,
Expand Down
Loading
Loading