Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for https://issues.redhat.com/browse/MODCLUSTER-774 #305

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

jfclere
Copy link
Member

@jfclere jfclere commented Nov 20, 2024

That prevents the message:
AH00898: URI cannot be parsed: ://:0/ returned by /

@jfclere jfclere requested a review from jajik November 20, 2024 10:31
Copy link
Collaborator

@jajik jajik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the same check is already used here, I would suggest adding a helper function

int is_worker_empty(const proxy_worker *worker) {
    return worker && (worker->s->port == 0 || worker->s->scheme[0] == '\0' || worker->s->hostname[0] == '\0');
}

and used that instead (in both cases)-

Copy link
Collaborator

@jajik jajik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will need

clang-format -i mod_proxy_cluster/mod_proxy_cluster.c

and I'm not sure about the volatile keyword we have there (isn't it always under lock?) I'll think about it..

@jajik
Copy link
Collaborator

jajik commented Nov 28, 2024

I looked at it again and I think we can drop the volatile from volatile proxy_worker *worker = *workers; as well as from the function signature.

Copy link
Collaborator

@jajik jajik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and if you squash the middle commits, it will be perfect

@jajik
Copy link
Collaborator

jajik commented Dec 10, 2024

Rebasing and I'll merge it afterwards

@jajik jajik merged commit 06c0ac1 into modcluster:main Dec 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants