[15395] in Athena Bugs
recover fails for large discuss meetings
daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Mon Aug 18 01:40:48 1997
From: <mhpower@MIT.EDU>
To: bug-discuss@MIT.EDU
Cc: bugs@MIT.EDU, sipb-athena-bugs@MIT.EDU
Date: Mon, 18 Aug 1997 01:40:42 EDT
If one attempts to recover a discuss meeting that has more than 20000
transactions, recover prints an error message similar to
More transactions than expected: 20001
and then exits. As far as I can tell, this behavior makes no sense at
all. There is no reason why recover should be designed for use only
with small discuss meetings, and it seems plausible that someone
needing to recover a meeting would be willing to devote more than
80000 bytes of memory to the task.
The attached patch should allow recovery of meetings up to a number of
transactions limited only by the amount of available memory.
Matt
*** /mit/source/athena/bin/discuss/server/recover.c Fri Sep 20 12:12:50 1996
--- recover.c Mon Aug 18 01:37:01 1997
***************
*** 31,33 ****
#define NULL 0
- #define MAX_TRNS 20000
#define min(a, b) (a < b ? a : b)
--- 31,32 ----
***************
*** 42,44 ****
static char *mtg_name, *location, *chairman, *trn_file;
! static int trn_pos[MAX_TRNS];
static int found_eof;
--- 41,43 ----
static char *mtg_name, *location, *chairman, *trn_file;
! static int *trn_pos;
static int found_eof;
***************
*** 158,161 ****
! if (th.current > MAX_TRNS) {
! fprintf (stderr, "More transactions than expected: %d\n", th.current);
exit(1);
--- 157,161 ----
! trn_pos = (int *) malloc (sizeof(int) * th.current);
! if (trn_pos == (int *) NULL) {
! fprintf (stderr, "Can't allocate memory for transaction positions\n");
exit(1);