I ran into a problem making repeated calls to rrd_create() within
the same process. The second and all subsequent calls would skip
the beginning elements in the argv array. I added an initialization
for optind and opterr to both rrd_create and rrd_update. The diffs
are below. If I'm reading the cvs files correctly, I'd have to make
the same change in the devel version as well.
I hope this is useful,
Mike
::::::::::::::
rrd_create.diff
::::::::::::::
--- rrd_create.c 2005-03-02 11:53:10.130128000 -0500
+++ rrd_create.c.orig 2005-03-02 11:45:29.845379000 -0500
@@ -44,10 +44,6 @@
rrd.ds_def = NULL;
rrd.rra_def = NULL;
- /* reset the getopt_long static ints so that we can reuse the loop */
- optind = 0 ;
- opterr = 0 ;
-
while (1){
static struct option long_options[] =
{
::::::::::::::
rrd_update.diff
::::::::::::::
--- rrd_update.c 2005-03-02 13:46:12.051582000 -0500
+++ rrd_update.c.orig 2005-03-02 13:44:58.340821000 -0500
@@ -98,10 +98,6 @@
char *endptr; /* used in the conversion */
- /* reset the getopt_long static ints so that we can reuse the loop */
- optind = 0 ;
- opterr = 0 ;
-
while (1) {
static struct option long_options[] =
{
--
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