Skip to content
Closed
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
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ case $host_os_def in
AS_IF([test "x$ax_cv_c_compiler_vendor" = "xgnu"], [
# This is useful for finding odd conversions
# common_opt="-pipe -Wall -Wconversion -Wno-sign-conversion -Wno-format-truncation"
common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow"
common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -Wno-deprecated-declarations"
debug_opt="-ggdb3 $common_opt"
release_opt="-g $common_opt $optimizing_flags -feliminate-unused-debug-symbols -fno-strict-aliasing"
cxx_opt="-Wno-invalid-offsetof -Wno-noexcept-type"
Expand Down
11 changes: 5 additions & 6 deletions proxy/http/remap/NextHopHealthStatus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,21 @@ NextHopHealthStatus::markNextHop(TSHttpTxn txn, const char *hostname, const int
new_fail_count = h->failCount = 1;
}
} else if (result.retry == true) {
h->failedAt = _now;
h->failedAt = _now;
new_fail_count = h->failCount = 1;
}
} // end lock guard
NH_Note("[%" PRId64 "] NextHop %s marked as down %s", sm_id, (result.retry) ? "retry" : "initially", h->hostname.c_str());
} else {
int old_count = 0;
// if the last failure was outside the retry window, set the failcount to 1 and failedAt to now.
{ // lock guard
std::lock_guard<std::mutex> lock(h->_mutex);
if ((h->failedAt + retry_time) < static_cast<unsigned>(_now)) {
h->failCount = 1;
h->failedAt = _now;
new_fail_count = h->failCount = 1;
h->failedAt = _now;
} else {
old_count = h->failCount = 1;
new_fail_count = h->failCount += 1;
}
new_fail_count = old_count + 1;
} // end of lock_guard
NH_Debug(NH_DEBUG_TAG, "[%" PRId64 "] Parent fail count increased to %d for %s", sm_id, new_fail_count, h->hostname.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion proxy/logging/LogFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ wipeField(char **field, char *pattern, const char *uppercase_field)

// search new param again
const char *new_param = strchr(lookup_query_param + field_pos, '&');
if (new_param && (new_param + 1)) {
if (new_param && *(new_param + 1)) {
pattern_in_param_name = findPatternFromParamName(new_param + 1, pattern);
} else {
break;
Expand Down