[2487] in Athena Bugs
A bug with Xaw/Mailbox.c
daemon@ATHENA.MIT.EDU (tldavis@ATHENA.MIT.EDU)
Wed Jun 28 16:37:37 1989
From: <tldavis@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Cc: rws@ATHENA.MIT.EDU
Date: Wed, 28 Jun 89 13:50:31 EDT
Program with which you had the problem: xbiff
Name of person who discovered the bug: Tim Davis
Their MIT phone number: 225-7615 or 253-2491
Their MIT address: E25-303
Their Athena Login ID: tldavis
------------------------------------------------------------------------
A brief synopsis of the problem:
xbiff doesn't respond to checkCommand resource chages.
------------------------------------------------------------------------
Please describe the problem in detail:
/mit/x11/src/lib/Xaw/Mailbox.c:check_mailbox() has a bad switch
statement with no break;'s on return from system() call. As written,
the switch always falls through to set mailboxsize = 0.
------------------------------------------------------------------------
Repeat by (please enter a set of commands which will allow us to
repeat the bug):
xbiff -xrm \*CheckCommand:msgchk
to check athena mailbox. Send yourself mail. No show of new mail.
------------------------------------------------------------------------
Fix: replace the switch statement with the following (the first break; is
important!):
switch (system(w->mailbox.check_command)) {
case 0: mailboxsize = w->mailbox.last_size +1;
break;
case 2: mailboxsize = 0;
break;
default: break;
}