Bug in Custom Object Variables (Nagios 3.0RC1) (patch)

Ethan Galstad nagios at nagios.org
Tue Jan 15 19:10:19 CET 2008


Good work Thomas!  This will be in CVS shortly.

td at Dunkel.de 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;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel


-- 


Ethan Galstad
Nagios Developer
___
Email: nagios at nagios.org
Web:   www.nagios.org

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list