Skip to content
Merged
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
3 changes: 2 additions & 1 deletion proxy/ParentSelection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ ParentRecord::ProcessParents(char *val, bool isPrimary)
int port = 0;
char *tmp = nullptr, *tmp2 = nullptr, *tmp3 = nullptr;
const char *errPtr = nullptr;
float weight = 1.0;
float weight = DEFAULT_PARENT_WEIGHT;

if (parents != nullptr && isPrimary == true) {
return "Can not specify more than one set of parents";
Expand All @@ -470,6 +470,7 @@ ParentRecord::ProcessParents(char *val, bool isPrimary)
// Loop through the set of parents specified
//
for (int i = 0; i < numTok; i++) {
weight = DEFAULT_PARENT_WEIGHT; // reset weight to the default
current = pTok[i];

// Find the parent port
Expand Down
1 change: 1 addition & 0 deletions proxy/ParentSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <vector>

#define MAX_PARENTS 64
#define DEFAULT_PARENT_WEIGHT 1.0

struct RequestData;
struct matcher_line;
Expand Down