Re: [Nagios-devel] Segmentation fault when nebmodule returns with

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
Guest

Re: [Nagios-devel] Segmentation fault when nebmodule returns with

Post by Guest »

Hi,

> Other than that, it looks obviously correct, although I wonder if it
> wouldn't be better to actually pass the real nebmodule struct to the
> init function. I guess that's what the entire idea was initially, or
> Ethan wouldn't have missed that one in set_module_info().

Agreed, but actually neb_load_module calls the initfunc with the
module_handle, not with the nebmodule struct.

result=(*initfunc)(NEBMODULE_NORMAL_LOAD,mod->args,mod->module_handle);

That is why the module itself doesn't know anything about itself other
than its module_handle. This approach is also charming because the
nebmodule struct can only be altered through API functions. I am
indifferent about these two approaches, but the API should be
consistent and not segfault because of inconsistency.



Thanks.

Tobias





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked