Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   Auto-increment substitutions broken with records for multiple days, posted by Richard Stamper on Wed Jun 24 15:02:49 2009 
    icon2.gif   Re: Auto-increment substitutions broken with records for multiple days, posted by Stefan Ritt on Thu Jun 25 10:09:18 2009 
Message ID: 66414     Entry time: Thu Jun 25 10:09:18 2009     In reply to: 66411
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Bug fix  OS: All  ELOG Version: 2.7.6-2191 
Subject: Re: Auto-increment substitutions broken with records for multiple days 
> An alternative patch:
> 
>       /* if date part matches */
>       if (strlen(attrib[index]) > 0 && strncmp(attrib[index], retstr, loc) == 0)
>           /* retrieve old index */
>          if (atoi(attrib[index] + loc) > old_index)
>             old_index = atoi(attrib[index] + loc);
>   
> does not make this assumption and also appears to work OK when I test it.

Yes, this is the right one, it searches all entries to have the same date than the current one, and then looks for the 
largest index which will be stored in old_index and later incremented by one. I committed your patch to the 
repository. Thanks a lot.
ELOG V3.1.5-2eba886