[Xymon] Bug and patch - directory name not displayed in error message

John Horne john.horne at plymouth.ac.uk
Mon Mar 12 17:14:41 CET 2012


Hello,

Using Xymon 4.3.7 I see in my /var/log/xymon/xymonlaunch.log log file
the following error:

===================================
2012-03-12 16:07:57 Loading tasklist configuration
from /home/xymon/server/etc/tasks.cfg
2012-03-12 16:07:57 Cannot open directory
===================================

This isn't too much use since it doesn't say what directory it is trying
to open.

It seems the problem is in the file lib/stackio.c (around line 338). A
patch to fix this is here:

==========================================
--- lib/stackio.c.orig  2011-07-31 22:01:52.000000000 +0100
+++ lib/stackio.c       2012-03-12 16:07:34.619479967 +0000
@@ -338,7 +338,7 @@
        if (*dirname == '/') strcpy(dirfn, dirname); else sprintf(dirfn,
"%s/%s", stackfd_base, dirname);
 
        if ((dirfd = opendir(dirfn)) == NULL) {
-               errprintf("Cannot open directory %s\n", fn);
+               errprintf("Cannot open directory %s\n", dirfn);
                return;
        }
 
==========================================

(Sorry about the line wrapping.)




John.

-- 
John Horne                   Tel: +44 (0)1752 587287
Plymouth University, UK      Fax: +44 (0)1752 587001



More information about the Xymon mailing list