}
static
-int
+long long
fname2index(const char *filename)
{
char *p = rindex(filename, '.');
char *s;
+ long long ret;
if(p == NULL)
return 0;
}
}
- return atoi(p+1)+1;
+ sscanf(p+1,"%lld",&ret);
+ return ret+1;
}
es->rotate_index = filename ? fname2index(filename) : 0;
IL_EVENT_ID_FREE(job_id);
- il_log(LOG_DEBUG, " creating event store for id %s, filename %s, rotate index %d\n",
+ il_log(LOG_DEBUG, " creating event store for id %s, filename %s, rotate index %lld\n",
job_id_s, es->event_file_name, es->rotate_index);
if(pthread_rwlock_init(&es->commit_lock, NULL))
long offset; /* expected file position of next event */
time_t last_modified; /* time of the last file modification */
int generation; /* cleanup counter, scopes the offset */
- int rotate_index; /* rotation counter */
+ long long rotate_index; /* rotation counter */
struct event_store_list *le; /* points back to the list */
pthread_rwlock_t commit_lock; /* lock to prevent simultaneous updates to last_committed_* */
pthread_rwlock_t offset_lock; /* lock to prevent simultaneous updates offset */