diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-05-27 18:00:46 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-05-27 18:00:46 +0000 |
commit | 8598c522b23a64ca600b0440e43b1bc406eda01b (patch) | |
tree | ecf82b787638623aa139392d753f78b9ff4eb9d1 /ringbuffer.c | |
parent | 09c06a932dfe47f73d479026cb1db7b84fa401a8 (diff) |
Set RINGBUFFER_MAX_NUM_FILES to 100000. Use it to generate file names.
Add RINGBUFFER_WARN_NUM_FILES and use it to print a warning. Print
warnings when we change the number of ringbuffer files.
svn path=/trunk/; revision=32998
Diffstat (limited to 'ringbuffer.c')
-rw-r--r-- | ringbuffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ringbuffer.c b/ringbuffer.c index 94efe0b5c7..ca94655438 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -113,7 +113,7 @@ static int ringbuf_open_file(rb_file *rfile, int *err) #endif current_time = time(NULL); - g_snprintf(filenum, sizeof(filenum), "%05u", (rb_data.curr_file_num + 1) % 100000); + g_snprintf(filenum, sizeof(filenum), "%05u", (rb_data.curr_file_num + 1) % RINGBUFFER_MAX_NUM_FILES); strftime(timestr, sizeof(timestr), "%Y%m%d%H%M%S", localtime(¤t_time)); rfile->name = g_strconcat(rb_data.fprefix, "_", filenum, "_", timestr, rb_data.fsuffix, NULL); |