From 3de2b1be7405adac31bd796f3380b9d8edbe0f99 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 9 May 2011 08:12:26 +0000 Subject: 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 --- wiretap/ascendtext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'wiretap/ascendtext.c') 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; } -- cgit v1.2.3