diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-05-09 08:12:26 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-05-09 08:12:26 +0000 |
commit | 3de2b1be7405adac31bd796f3380b9d8edbe0f99 (patch) | |
tree | b444b752e4435e0b436bbf8eef5c96af9f35a2de /wiretap/ber.c | |
parent | 88a1ed85e3156e80c3fed4848d651aae433dc8d8 (diff) |
Get rid of the fd member of a wth structure; the FILE_T's in that
structure include a file descriptor. Add a wtap_fstat() for the file
readers that use file times to generate time stamps (we really need a
way to say "this file has no time stamps" or "this file has only
relative time stamps).
svn path=/trunk/; revision=37026
Diffstat (limited to 'wiretap/ber.c')
-rw-r--r-- | wiretap/ber.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/wiretap/ber.c b/wiretap/ber.c index 11a37432ba..fba02f240f 100644 --- a/wiretap/ber.c +++ b/wiretap/ber.c @@ -47,7 +47,7 @@ static gboolean ber_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off guint8 *buf; gint64 file_size; int packet_size; - struct stat statb; + ws_statb64 statb; *err = 0; @@ -82,10 +82,8 @@ static gboolean ber_read(wtap *wth, int *err, gchar **err_info, gint64 *data_off wth->phdr.caplen = packet_size; wth->phdr.len = packet_size; - if (fstat(wth->fd, &statb) == -1) { - *err = errno; + if (wtap_fstat(wth, &statb, err) == -1) return FALSE; - } wth->phdr.ts.secs = statb.st_mtime; wth->phdr.ts.nsecs = 0; |