[rrd-developers] 1.0.49 rrd_create library patch?
O'Connor, Michael
michael.oconnor at titan.com
Wed Mar 2 20:41:54 MET 2005
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:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-developers
mailing list