Static length for string variables in objects

Andreas Ericsson ae at op5.se
Sun Feb 6 16:42:18 CET 2005


I'm working on adding inherent redundancy to Nagios through a loadable 
module (which will eventually turn to a fullblown cluster solution). The 
fact that host_name and friends are pointers as opposed to char arrays 
(char *host_name instead of char host_name[MAX_OBJECT_NAME_LEN]) makes 
it immensely more difficult. Also, the lack of index lookup tables makes 
it impossible to simply send an object type and id.

So... would a patch to fix this be welcome? It's a fairly major code 
change but should simplify things immensely, not least in the memory 
management parts of the code, although it will set hard limits on the 
length of object names (I was thinking 40 chars) and aliases (I was 
thinking 80 chars).

This would only have to be done for objects that are subject to checking 
(hosts and services) but most likely other kinds of objects would 
benefit from this type of database style normalization as well.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl




More information about the Developers mailing list