aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ascendtext.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-05-09 08:12:26 +0000
committerGuy Harris <guy@alum.mit.edu>2011-05-09 08:12:26 +0000
commit3de2b1be7405adac31bd796f3380b9d8edbe0f99 (patch)
treeb444b752e4435e0b436bbf8eef5c96af9f35a2de /wiretap/ascendtext.c
parent88a1ed85e3156e80c3fed4848d651aae433dc8d8 (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.c5
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;
}