small bug in broker.c

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
eponymousalias
Posts: 17
Joined: Mon Mar 07, 2016 5:38 am

small bug in broker.c

Post by eponymousalias »

In nagios-4.4.5/base/broker.c:

Code: Select all

    535 /* sends contact status updates to broker */
    536 void broker_contact_status(int type, int flags, int attr, contact *cntct, struct timeval *timestamp) {
    537         nebstruct_service_status_data ds;
Line 537 should be this instead:

Code: Select all

    537         nebstruct_contact_status_data ds;
bheden
Product Development Manager
Posts: 179
Joined: Thu Feb 13, 2014 9:50 am
Location: Nagios Enterprises

Re: small bug in broker.c

Post by bheden »

You're right, we'll get it fixed.

Thanks. I think in the meantime, this shouldn't matter since nebstruct_service_status_struct and nebstruct_contact_status_struct are almost the exact same struct definition - and the handle broker casts to (void*) and then into the appropriate struct. Since they both are aligned identically, this shouldn't be a problem, but hey those are famous last words.

Anyway, thank you!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Nagios Enterprises
Senior Developer
Locked