[rrd-developers] Re: version correction

Stanislav Sinyagin ssinyagin at yahoo.com
Fri May 2 15:07:28 MEST 2003

--- Sasha Mikheev <sasha at avalon-net.co.il> wrote:
> live head size is supposed to be ok for the current version (3).

no, it's not OK. Read my first message in "FOUND IT" thread.

"src/rrd_create.c" line 554:
           sizeof(live_head_t),1, rrd_file);

it means that version 3 head is always written, regardless of the 
RRD version being created. 

Compare this to "src/rrd_open.c" line 138:
    /* handle different format for the live_head */
    if(version < 3) {
            rrd->live_head = (live_head_t *)malloc(sizeof(live_head_t));
            if(rrd->live_head == NULL) {
                rrd_set_error("live_head_t malloc");
                return (-1);
                fread(&rrd->live_head->last_up, sizeof(long), 1, *in_file);
                rrd->live_head->last_up_usec = 0;
    else {
            MYFREAD(rrd->live_head, live_head_t, 1)

It's not difficult to fix it, but better if you do it yourself. 
Please do this as soon as possible, since the current CVS snapshot remains 


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