--------------enigD10FB84203D39956DE3DB248
Content-Type: multipart/mixed; boundary="------------030105080704040608080906"
This is a multi-part message in MIME format.
--------------030105080704040608080906
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi Roman,
you are right. There is a small problem when there are more than one
check result in a file.
Another user told me and he tried your changes and seems to be happy
right now.
But I think there is a better way to determine the end of a check
result... I will try to work out another solution and would like to now
if you would give it a chance when I am ready?
But to make it easier to Ethan, here are your changes as a handle patch
file
Kind regards,
Hendrik
Roman Trylski schrieb:
> Hi all,
>=20
> There is a bug in Nagios 3.0a4, utils.c, function process_check_result_=
file.
>=20
> It's impossible to process result list having more then one result outp=
ut.
> eg. submitting many service checks in one moment causes creating tempor=
ary=20
> file (in /usr/local/nagios/var/spool/checkresults) which contains sever=
al=20
> records divided by '\n'. Function process_check_result_file which proce=
ss=20
> this file is looking for a '\x0' as a record divider, but there is no s=
uch=20
> line.
> Result: function process_check_result_file returns only one last record=
in=20
> file.
>=20
> Remedy: replace '\x0' for '\n' in:
>=20
> /* whitespace indicates end of record */
> else if(input[0]=3D=3D'\x0'){
>=20
> It should work fine, it's working for me
>=20
> I'm not familiar with nagios architecture, maybe there is other solutio=
n for=20
> this problem (putting whitespace between records? maybe?).
>=20
> have fun
> Roman Trylski=20
>=20
>=20
> -----------------------------------------------------------------------=
--
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>=20
>=20
--------------030105080704040608080906
Content-Type: text/plain;
name="utils.c.byroman.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="utils.c.byroman.patch"
diff -Naur nagios3-clean/base/utils.c nagios3/base/utils.c
--- nagios3-clean/base/utils.c 2007-05-25 22:10:32.000000000 +0200
+++ nagios3/base/utils.c 2007-05-30 18:19:56.000000000 +0200
@@ -4125,8 +4125,8 @@
if(input[0]=3D=3D'#')
continue;
- /* whitespace indicates end of record */
- else if(input[0]=3D=3D'\x0'){
+ /* newline at beginning of the line indicates end of reco=
rd */
+ else if(input[0]=3D=3D'\n'){
/* we have something... */
if(new_cr){
--------------030105080704040608080906--
--------------enigD10FB84203D39956DE3DB248
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
iD8DBQFGXaWhlI0PwfxLQjkRAsAHAJ0TKgZMammqJpCZMqYaAE9idI6m9gCfYtnJ
SDXgiS0rvsqKxSwF2wUrEas=
=cS63
-----END PGP SIGNATURE-----
--------------enigD10FB84203D39956DE3DB248--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]