Skip to content

Conversation

@jnpkrn
Copy link

@jnpkrn jnpkrn commented Jun 16, 2016

No description provided.

jnpkrn added 8 commits June 16, 2016 23:25
Introduced with a2bbdbd but not removed with ed5d41b.
Also ensure the comment is not ending with a free-floating "a" particle.
First, no other invocation is performed with this extra check, and then,
find_site_by_id itself would have triggered NULL pointer dereference
by that point already.
So far, log would contain just the (reasonably unique) identifier
of the astray originator, but it's hard or downright impossible
to unambiguously recover the original address just with this piece
of knowledge.  Hence to allow for convenient tracking such cases
down, log also the source address if possible.

Technically, we are abusing the fact that said identifiers are supposed
to be non-negative (most significant bit set to zero) while the proper
OK state is indicated with zero and proper error condition mostly with
negative integers.  So these identifiers fit nicely into the positive
integer area, except for:
- zero identifier <-- we flip all the bits but MSB to 1 in this case
- malformed identifiers with MSB=1 <-- we flip MSB to 0

Also, we make sure that remaining error conditions not following the
rule and being indicated with positive integers are now indicated
with negative ones.

This convention is also mentioned in the function declaration's comment.
@dmuhamedagic dmuhamedagic merged commit 3b0bc3a into ClusterLabs:master Jun 29, 2016
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