Here is the problem and the solution. RRD functions WRONGLY assume that they are called from the command line and use getopt to parse arguments. Getopt uses a static int named "optind" to keep track which argument is checking as an option. So if in your program you use getopt to parse any arguments you must RESET "optind" by setting it to 0 before calling the rrd_* function that will call it again.
A fix would be to have wrapper functions that check the arguments and call rrd_* utils with the proper arguments. RRD_* functions would have to accept varying numbers of arguments, something posible in C and the whole problem is fixed. Nikolaos Abatzis Consultant Blackboard Inc. -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-developers WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
