aboutsummaryrefslogtreecommitdiff
path: root/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'status.c')
-rw-r--r--status.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/status.c b/status.c
index 9834f1e..4bbea28 100644
--- a/status.c
+++ b/status.c
@@ -5,7 +5,7 @@
* packet encryption, packet authentication, and
* packet compression.
*
- * Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net>
+ * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
@@ -168,7 +168,9 @@ status_flush (struct status_output *so)
#if defined(HAVE_FTRUNCATE)
{
const off_t off = lseek (so->fd, (off_t)0, SEEK_CUR);
- ftruncate (so->fd, off);
+ if (ftruncate (so->fd, off) != 0) {
+ msg (M_WARN, "Failed to truncate status file: %s", strerror(errno));
+ }
}
#elif defined(HAVE_CHSIZE)
{