--- projects/cms/source/idar/idar.c 2003/08/21 13:51:19 1.17 +++ projects/cms/source/idar/idar.c 2004/06/02 16:11:48 1.23 @@ -1,6 +1,6 @@ /* * i-scream central monitoring system - * http://www.i-scream.org.uk + * http://www.i-scream.org * Copyright (C) 2000-2002 i-scream * * This program is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -413,6 +414,8 @@ int parse_xml(char *xml, machine_data_list_t **md){ machine_data_list->diskio_data_list=NULL; *md=machine_data_list; num_hosts++; + } else { + xmlFree(hostname); } /* Now we want to pull out the data */ @@ -971,7 +974,7 @@ void usage() { printf(" default: %s\n", DEF_SERVER_NAME); printf(" -p Specifies the i-scream server port.\n"); printf(" default: %d\n", DEF_SERVER_PORT); - printf(" -l Sets the list of hosts to monitor in a semi-colon seperated list.\n"); + printf(" -l Sets the list of hosts to monitor in a semi-colon separated list.\n"); printf(" -h Displays this help information.\n"); printf("\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); exit(1); @@ -1004,7 +1007,7 @@ int main(int argc, char **argv){ extern int errno; display_config_t display_config; - char ch; + int ch; int data_fileno, stdin_fileno, biggest_fileno; @@ -1099,6 +1102,7 @@ int main(int argc, char **argv){ machine_list=strdup(optarg); break; case 'h': + default: usage(); break; }