Hi, Andy Shellam wrote: > > Good point. > > From my amateur experience with C, I know the "," will split the string > "contactgroup1, contactgroup2" into "contactgroup1" and " contactgroup2" > (note the space.)
Yes. That's what I thought. :-/ > Whether Nagios would then realise that " contactgroup2" and > "contactgroup2" should be the same thing, I'm not sure. strip() is called after the parsing of hostescalation's contactgroups but not after the parsing of: - hostescalation's contacts - serviceescalation's contactsgroups - serviceescalation's contacts. - And some other places where comma separated values are authorized like *_commands. Note however that *_options, *_coords and timeranges should not need call to strip(). /* strip newline, carriage return, and tab characters from beginning and end of a string */ void strip(char *buffer) So the example I gave you before would only work for hostescalation's contactgroups but not anywhere else. A cleanup should be done by removing the white-space delimiter and adding strip() calls where necessary. -- Mathieu Gagné ------------------------------------------------------------------------- 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/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null