Page 1 of 1

[Nagios-devel] Patch for 2.0 minor bug in servicegroup definitions

Posted: Fri Mar 26, 2004 4:56 pm
by Guest
This is a multi-part message in MIME format.

------=_NextPart_000_003D_01C4136C.27FCEF60
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit


In Nagios 2.0, only the last member in the members line of a
servicegroup is added to the servicegroup; any others are ignored.
There's another patch which was recently applied to CVS which "fixed"
this problem (submitted by me), but it only fixed part of the problem.
Sorry, folks....

Regards,
Chris

------=_NextPart_000_003D_01C4136C.27FCEF60
Content-Type: application/octet-stream;
name="nagios-servicegroup-multiple-members.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="nagios-servicegroup-multiple-members.patch"

*** ../nagios-orig/xdata/xodtemplate.c Wed Mar 24 23:28:31 2004=0A=
--- xdata/xodtemplate.c Fri Mar 26 18:35:52 2004=0A=
***************=0A=
*** 6456,6464 ****=0A=
if(temp_servicegroup->members=3D=3DNULL)=0A=
continue;=0A=
=0A=
! member_names=3Dstrdup(temp_servicegroup->members);=0A=
! if(member_names=3D=3DNULL)=0A=
! return ERROR;=0A=
=0A=
=
for(temp_ptr=3Dmember_names;temp_ptr;temp_ptr=3Dstrchr(temp_ptr+1,',')){=0A=
=0A=
--- 6432,6439 ----=0A=
if(temp_servicegroup->members=3D=3DNULL)=0A=
continue;=0A=
=0A=
! member_names=3Dtemp_servicegroup->members;=0A=
! temp_servicegroup->members =3D NULL;=0A=
=0A=
=
for(temp_ptr=3Dmember_names;temp_ptr;temp_ptr=3Dstrchr(temp_ptr+1,',')){=0A=
=0A=
***************=0A=
*** 6498,6505 ****=0A=
return ERROR;=0A=
}=0A=
=0A=
- free(temp_servicegroup->members);=0A=
- temp_servicegroup->members=3DNULL;=0A=
=
for(this_servicelist=3Dtemp_servicelist;this_servicelist;this_servicelist=
=3Dthis_servicelist->next){=0A=
=0A=
/* add this service to the servicegroup members directive */=0A=
--- 6473,6478 ----=0A=

------=_NextPart_000_003D_01C4136C.27FCEF60--






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