[23367] in Source-Commits

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

/svn/athena r23021 - in trunk/athena/bin/discuss: debian edsc

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Wed Jun 11 19:40:19 2008

Date: Wed, 11 Jun 2008 19:39:46 -0400 (EDT)
From: ghudson@MIT.EDU
Message-Id: <200806112339.TAA01326@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: ghudson
Date: 2008-06-11 19:39:45 -0400 (Wed, 11 Jun 2008)
New Revision: 23021

Modified:
   trunk/athena/bin/discuss/debian/changelog
   trunk/athena/bin/discuss/edsc/edsc.c
   trunk/athena/bin/discuss/edsc/time.c
Log:
In discuss:
  * Fix a crash bug in edsc (int/long mismatch in short_time).
  * Put crash dumps in /tmp instead of the antiquated /usr/tmp.


Modified: trunk/athena/bin/discuss/debian/changelog
===================================================================
--- trunk/athena/bin/discuss/debian/changelog	2008-06-11 20:30:48 UTC (rev 23020)
+++ trunk/athena/bin/discuss/debian/changelog	2008-06-11 23:39:45 UTC (rev 23021)
@@ -1,3 +1,10 @@
+debathena-discuss (10.0.3-0debathena1) unstable; urgency=low
+
+  * Fix a crash bug in edsc (int/long mismatch in short_time).
+  * Put crash dumps in /tmp instead of the antiquated /usr/tmp.
+
+ --
+
 debathena-discuss (10.0.2-0debathena1) unstable; urgency=low
 
   * Stop assuming that long is 32 bits.

Modified: trunk/athena/bin/discuss/edsc/edsc.c
===================================================================
--- trunk/athena/bin/discuss/edsc/edsc.c	2008-06-11 20:30:48 UTC (rev 23020)
+++ trunk/athena/bin/discuss/edsc/edsc.c	2008-06-11 23:39:45 UTC (rev 23021)
@@ -86,7 +86,7 @@
 	 * If the fork() fails or if this is the child, do a cache shutdown
 	 */
 	if (pid <= 0) {
-		printf("; Edsc crash (code dump in /usr/tmp) --- signal %d\n",
+		printf("; Edsc crash (code dump in /tmp) --- signal %d\n",
 		       sig);
 #ifdef EDSC_CACHE
 		if (!shutting_down_cache) {
@@ -96,11 +96,11 @@
 #endif
 	}
 	/*
-	 * If the fork fails or if this is the parent, cd to /usr/tmp
+	 * If the fork fails or if this is the parent, cd to /tmp
 	 * and perform a crash dump
 	 */
 	if (pid != 0) {
-		(void) chdir("/usr/tmp");
+		(void) chdir("/tmp");
 		signal(SIGILL, SIG_DFL);
 		abort();
 	}

Modified: trunk/athena/bin/discuss/edsc/time.c
===================================================================
--- trunk/athena/bin/discuss/edsc/time.c	2008-06-11 20:30:48 UTC (rev 23020)
+++ trunk/athena/bin/discuss/edsc/time.c	2008-06-11 23:39:45 UTC (rev 23021)
@@ -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] = ' ';


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