Make the argument to "abs_time_secs_to_str()" a "time_t" - it's in ANSI
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 12 Feb 2003 00:44:04 +0000 (00:44 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 12 Feb 2003 00:44:04 +0000 (00:44 +0000)
C, and it's the right thing to pass to "localtime()".

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7125 f5534014-38df-0310-8fa8-9805f1628bb7

epan/to_str.c
epan/to_str.h
packet-radius.c

index a0315c30de125cd107552ae17413fcb836bf2d8a..5819d2b4f7545ec35c77afe298e893e5d11919b3 100644 (file)
@@ -1,7 +1,7 @@
 /* to_str.c
  * Routines for utilities to convert various other types to strings.
  *
- * $Id: to_str.c,v 1.24 2003/02/11 19:42:38 guy Exp $
+ * $Id: to_str.c,v 1.25 2003/02/12 00:44:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -442,7 +442,7 @@ abs_time_to_str(nstime_t *abs_time)
 }
 
 gchar *
-abs_time_secs_to_str(guint32 abs_time)
+abs_time_secs_to_str(time_t abs_time)
 {
         struct tm *tmp;
         static gchar *cur;
index e14c44bd090c7163e4fd590f55267975bbc68c27..fcc474325d91eb8840003158f69b763967fe5629 100644 (file)
@@ -1,7 +1,7 @@
 /* to_str.h
  * Definitions for utilities to convert various other types to strings.
  *
- * $Id: to_str.h,v 1.13 2003/02/11 19:42:38 guy Exp $
+ * $Id: to_str.h,v 1.14 2003/02/12 00:44:04 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -58,7 +58,7 @@ extern gchar* vines_addr_to_str(const guint8 *addrp);
 extern gchar*  time_secs_to_str(guint32);
 extern gchar*  time_msecs_to_str(guint32);
 extern gchar*  abs_time_to_str(nstime_t*);
-extern gchar*  abs_time_secs_to_str(guint32);
+extern gchar*  abs_time_secs_to_str(time_t);
 extern void    display_signed_time(gchar *, int, gint32, gint32, time_res_t);
 extern gchar*  rel_time_to_str(nstime_t*);
 extern gchar*  rel_time_to_secs_str(nstime_t*);
index 81f920713ee7f34fe567aa500697328045c14621..e0d2cea883604f9b6e58614cde8e660c8b03610a 100644 (file)
@@ -5,7 +5,7 @@
  *
  * RFC 2865, RFC 2866, RFC 2867, RFC 2868, RFC 2869
  *
- * $Id: packet-radius.c,v 1.74 2003/02/11 19:42:36 guy Exp $
+ * $Id: packet-radius.c,v 1.75 2003/02/12 00:44:02 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -2521,6 +2521,7 @@ static gchar *rd_value_to_str_2(gchar *dest, const e_avphdr *avph, tvbuff_t *tvb
   gchar *cont;
   value_string *valstrarr;
   guint32 intval;
+  time_t timeval;
   const guint8 *pd;
   guint8 tag;
 
@@ -2726,8 +2727,8 @@ static gchar *rd_value_to_str_2(gchar *dest, const e_avphdr *avph, tvbuff_t *tvb
                break;
 
         case( RADIUS_TIMESTAMP ):
-               intval=tvb_get_ntohl(tvb,offset+2);
-               sprintf(cont,"%d (%s)", intval, abs_time_secs_to_str(intval));
+               timeval=tvb_get_ntohl(tvb,offset+2);
+               sprintf(cont,"%d (%s)", timeval, abs_time_secs_to_str(timeval));
                break;
         case( RADIUS_INTEGER4_TAGGED ):
                intval = tvb_get_ntohl(tvb,offset+2);