aboutsummaryrefslogtreecommitdiffstats
path: root/packet-radius.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-02-11 19:42:38 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-02-11 19:42:38 +0000
commit0cd987716d14e7a60fbb008a2b9accad911411ef (patch)
tree06d7e070f252e1446aebb636a8a0b4e635cfd0d3 /packet-radius.c
parentffadc814309e6b3aca27a5d6597bf797fd4b09d5 (diff)
Add a "abs_time_secs_to_str()" routine that takes a UNIX time-since-the-
epoch-in-seconds value and converts it to a string. Use that routine in the RADIUS dissector, rather than using "ctime()" and "tzname[]" - "tzname[]" strings might contain non-ASCII characters, which currently give the GTK+ 1.3[.x] used on Windows, and also, I think, GTK+ 2.x, heartburn, as they expect UTF-8, not, for example, ISO 8859/1. Fix the string length in "abs_time_to_str()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7124 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-radius.c')
-rw-r--r--packet-radius.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/packet-radius.c b/packet-radius.c
index 339fa3ccba..81f920713e 100644
--- a/packet-radius.c
+++ b/packet-radius.c
@@ -5,7 +5,7 @@
*
* RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
*
- * $Id: packet-radius.c,v 1.73 2003/01/28 16:31:03 guy Exp $
+ * $Id: packet-radius.c,v 1.74 2003/02/11 19:42:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -2523,8 +2523,6 @@ static gchar *rd_value_to_str_2(gchar *dest, const e_avphdr *avph, tvbuff_t *tvb
guint32 intval;
const guint8 *pd;
guint8 tag;
- char *rtimestamp;
- extern char *tzname[2];
int vsa_length;
int vsa_len;
@@ -2729,9 +2727,7 @@ static gchar *rd_value_to_str_2(gchar *dest, const e_avphdr *avph, tvbuff_t *tvb
case( RADIUS_TIMESTAMP ):
intval=tvb_get_ntohl(tvb,offset+2);
- rtimestamp=ctime((time_t*)&intval);
- rtimestamp[strlen(rtimestamp)-1]=0;
- sprintf(cont,"%d (%s %s)", tvb_get_ntohl(tvb,offset+2), rtimestamp, *tzname);
+ sprintf(cont,"%d (%s)", intval, abs_time_secs_to_str(intval));
break;
case( RADIUS_INTEGER4_TAGGED ):
intval = tvb_get_ntohl(tvb,offset+2);