[23397] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r23051 - in trunk/athena/bin/discuss: client debian libds

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Mon Jun 30 12:52:20 2008

Date: Mon, 30 Jun 2008 12:51:51 -0400 (EDT)
From: ghudson@MIT.EDU
Message-Id: <200806301651.MAA10669@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: ghudson
Date: 2008-06-30 12:51:50 -0400 (Mon, 30 Jun 2008)
New Revision: 23051

Modified:
   trunk/athena/bin/discuss/client/time.c
   trunk/athena/bin/discuss/debian/changelog
   trunk/athena/bin/discuss/libds/tmem.c
Log:
In discuss:
  * Fix a crash bug in edsc on 64-bit platforms.
  * Fix date display in discuss on 64-bit platforms.


Modified: trunk/athena/bin/discuss/client/time.c
===================================================================
--- trunk/athena/bin/discuss/client/time.c	2008-06-30 15:40:09 UTC (rev 23050)
+++ trunk/athena/bin/discuss/client/time.c	2008-06-30 16:51:50 UTC (rev 23051)
@@ -19,14 +19,16 @@
 
 #include <stdio.h>
 #include <time.h>
+#include <discuss/types.h>
 
 char *
 short_time(time)
-     long *time;
+     date_times *time;
 {
      register struct tm *now;
+     time_t tval = *time;
 
-     now = localtime(time);
+     now = localtime(&tval);
      time_buf[2] = '/';
      time_buf[5] = '/';
      time_buf[8] = ' ';

Modified: trunk/athena/bin/discuss/debian/changelog
===================================================================
--- trunk/athena/bin/discuss/debian/changelog	2008-06-30 15:40:09 UTC (rev 23050)
+++ trunk/athena/bin/discuss/debian/changelog	2008-06-30 16:51:50 UTC (rev 23051)
@@ -1,3 +1,10 @@
+debathena-discuss (10.0.4-0debathena1) unstable; urgency=low
+
+  * Fix a crash bug in edsc on 64-bit platforms.
+  * Fix date display in discuss on 64-bit platforms.
+
+ -- Greg Hudson <ghudson@mit.edu>  Mon, 30 Jun 2008 12:50:56 -0400
+
 debathena-discuss (10.0.3-0debathena1) unstable; urgency=low
 
   * Fix a crash bug in edsc (int/long mismatch in short_time).

Modified: trunk/athena/bin/discuss/libds/tmem.c
===================================================================
--- trunk/athena/bin/discuss/libds/tmem.c	2008-06-30 15:40:09 UTC (rev 23050)
+++ trunk/athena/bin/discuss/libds/tmem.c	2008-06-30 16:51:50 UTC (rev 23051)
@@ -18,6 +18,7 @@
 #endif /* lint */
 
 #include <errno.h>
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <discuss/tfile.h>
@@ -75,8 +76,8 @@
 		return iovmove (SCATTER, (struct iovec **)infop,
 				argp, argn);
 	case TFDESTROY:
-		if (*(char **)info)
-			free (*(char **)info);
+		if (*info)
+			free (*infop);
 		return 0;
 	default:
 		*result = EINVAL;
@@ -93,7 +94,7 @@
 	ts[0].iov_base = buffer;
 	ts[0].iov_len = length;
 	ts[1].iov_len = 0;
-	return tcreate (length, (char *) ts, (int)ts, tmem);
+	return tcreate (length, (char *) ts, 1, tmem);
 }
 
 tfile memv_tfile (vec)


home help back first fref pref prev next nref lref last post