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/ascendtext.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/ascendtext.c')
-rw-r--r-- | wiretap/ascendtext.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wiretap/ascendtext.c b/wiretap/ascendtext.c index 801a01fe9b..dd8e750dd8 100644 --- a/wiretap/ascendtext.c +++ b/wiretap/ascendtext.c @@ -176,7 +176,7 @@ found: int ascend_open(wtap *wth, int *err, gchar **err_info) { gint64 offset; - struct stat statbuf; + ws_statb64 statbuf; guint8 buf[ASCEND_MAX_PKT_LEN]; ascend_pkthdr header; gint64 dummy_seek_start; @@ -235,8 +235,7 @@ int ascend_open(wtap *wth, int *err, gchar **err_info) packet's timestamp from the capture file's ctime, which gives us an offset that we can apply to each packet. */ - if (fstat(wth->fd, &statbuf) == -1) { - *err = errno; + if (wtap_fstat(wth, &statbuf, err) == -1) { g_free(ascend); return -1; } |