Please sign in to comment.
Correct off-by-one error in address table indices
Commit d809f23 changed the indices of this for loop from being 0-based to 1-based, but did not update the index into the contact object's "address" member accordingly to be zero-based. This meant that the value defined in the "address1" attribute of contact objects was made available in the "address2" attribute in LiveStatus query results, and "address2" in "address3" etc, per the definitions for the contact object in in nagios/objects.h and nagios4/objects.h. This change restores the zero base case for the loop index, but sets both the 1-based directive name and the 0-based array index correctly, restoring the expected behaviour.
- Loading branch information...