* logrunner.c
* (c) Peter Roozemaal, feb 2003
*
- * $Id: logrunner.cpp,v 1.4 2007-10-27 08:46:21 arjen Exp $
+ * $Id: logrunner.cpp,v 1.5 2007-11-21 15:23:32 arjen Exp $
*
* 1) compile,
* 2) Add 'logfile' elements to the gnucomo configuration file
char buffer[256];
*buffer = 0;
gethostname(buffer, sizeof(buffer));
- xsend("<?xml version='1.0'?>\n");
+
+ // Try to obtain the official name of the host (FQDN)
+
+ host = gethostbyname(buffer);
+ if (host != NULL)
+ {
+ strcpy(buffer, host->h_name);
+ }
+
+ xsend("<?xml version='1.0'?>\n");
xsend("<gcmt:message xmlns:gcmt=\"http://gnucomo.org/transport/\">\n");
xsend("<gcmt:header>\n<gcmt:hostname>");
xsend(buffer);