Re: [Nagios-devel] Bug in Custom Object Variables (Nagios 3.0RC1)

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] Bug in Custom Object Variables (Nagios 3.0RC1)

Post by Guest »

Good work Thomas! This will be in CVS shortly.

[email protected] wrote:
> Hi,
>
> I think I've found the bug.
> With this patch it works fine.
>
> Please check, if all is ok with this patch. :-)
>
> Best regards,
> Thomas Dohl
>
> -start---------------------------------------------------------------------------------------------------
> --- common.old/macros.c 2007-12-14 18:44:31.000000000 +0100
> +++ common/macros.c 2008-01-14 15:13:17.000000000 +0100
> @@ -3169,12 +3169,12 @@
> set_macro_environment_var(temp_customvariablesmember->variable_name,clean_macro_chars(temp_customvariablesmember->variable_value,STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS),set);
> }
>
> - /***** CUSTOM HOST VARIABLES *****/
> + /***** CUSTOM SERVICE VARIABLES *****/
> /* generate variables and save them for later */
> if((temp_service=macro_service_ptr) && set==TRUE){
> for(temp_customvariablesmember=temp_service->custom_variables;temp_customvariablesmember!=NULL;temp_customvariablesmember=temp_customvariablesmember->next){
> asprintf(&customvarname,"_SERVICE%s",temp_customvariablesmember->variable_name);
> - add_custom_variable_to_object(&macro_custom_host_vars,customvarname,temp_customvariablesmember->variable_value);
> + add_custom_variable_to_object(&macro_custom_service_vars,customvarname,temp_customvariablesmember->variable_value);
> my_free(customvarname);
> }
> }
> @@ -3187,7 +3187,7 @@
> if((temp_contact=macro_contact_ptr) && set==TRUE){
> for(temp_customvariablesmember=temp_contact->custom_variables;temp_customvariablesmember!=NULL;temp_customvariablesmember=temp_customvariablesmember->next){
> asprintf(&customvarname,"_CONTACT%s",temp_customvariablesmember->variable_name);
> - add_custom_variable_to_object(&macro_custom_host_vars,customvarname,temp_customvariablesmember->variable_value);
> + add_custom_variable_to_object(&macro_custom_contact_vars,customvarname,temp_customvariablesmember->variable_value);
> my_free(customvarname);
> }
> }
> -END---------------------------------------------------------------------------------------------------
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239 ... arketplace
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel


--


Ethan Galstad
Nagios Developer
___
Email: [email protected]
Web: www.nagios.org





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