juo@cloud9.Stratus.COM (John Oleynick) (08/08/89)
Last week I rebuilt Andrew, this time with AMS. Messages seems to work OK (except for 1 small problem) , but I can't read my mail with either CUI or VUI. Whenever I run either of them, they say: ELI-PRIMITIVE [READ (error opening file)] INTERNAL [eviEvalList (functionless symbol at list car)] And tell me that I have no mail. Messages finds my mail fine, though. I haven't done anything weird with the mspath (that I know of), although my .AMS.prof contains: $mail /home/lectroid/buckaroo/juo/.MESSAGES $official /cmu/itc/bb/off/.MESSAGES $local /cmu/itc/bb/.MESSAGES $external /cmu/itc/netbb/.MESSAGES mail /home/lectroid/buckaroo/juo/.MESSAGES/mail 2 0YrRAI 618517266 I tried removing the $official, $local and $external lines, and either the $mail or mail lines, but with out success. I also have a small problem with SendMessage. Whenever I send a message, it says the message is from: "John Oleynick9bww:706:53" <juo> My uid is 706, my gid is 53, and 9bww are the last 4 characters of my encrypted password, so it looks like it isn't copying something quite right from the password file. Also, even though I can't read anything in vui, I sent a message from it, and it didn't do this. I am using Andrew from the X11R3 tape, but I running it on X11R2 on a diskless Sun 3/60, connected to a Sun 3/280. Both are running SunOS 4.0.1, and YP, and I compiled Andrew with the standard Sun C compiler. Any ideas what is wrong? Thanks, John John Oleynick juo@cloud9.stratus.com uunet!harvard!husc6!encore!cloud9!juo
cfe+@ANDREW.CMU.EDU ("Craig F. Everhart") (08/09/89)
> Excerpts from internet.info-andrew: 8-Aug-89 AMS, CUI, VUI problems John > Oleynick@bu-cs.bu.e (1556) > Last week I rebuilt Andrew, this time with AMS. Messages seems to work > OK (except for 1 small problem) , but I can't read my mail with either > CUI or VUI. Whenever I run either of them, they say: > ELI-PRIMITIVE [READ (error opening file)] > INTERNAL [eviEvalList (functionless symbol at list car)] > And tell me that I have no mail. Messages finds my mail fine, though. This seems real weird: Messages, CUI, and VUI all use exactly the same code to read and handle your mail. > I also have a small problem with SendMessage. Whenever I send a > message, it says the message is from: > "John Oleynick9bww:706:53" <juo> > My uid is 706, my gid is 53, and 9bww are the last 4 characters > of my encrypted password, so it looks like it isn't copying something > quite right from the password file. Also, even though I can't read > anything in vui, I sent a message from it, and it didn't do this. I believe that this problem is one I fixed a couple of weeks ago in andrew/ams/libs/ms/init.c, the GetNameFromGecos... procedure. Naturally, there have been other changes to this procedure, not the least of which was renaming it from GetNameFromGecosField to GetNameFromGecos and changing its arguments), but I bet that you could change the code at line 563 of andrew/ams/libs/ms/init.c from: if (*newname) { strncpy(*newname, start, prefixlen); if (ampersand) { char *uname = (*newname) + prefixlen; strcpy(uname, p->pw_name); if (islower(*uname)) *uname = toupper(*uname); strcat(*newname, ampersand+1); } } to: if (*newname) { strncpy(*newname, start, prefixlen); if (ampersand) { char *uname = (*newname) + prefixlen; strcpy(uname, p->pw_name); if (islower(*uname)) *uname = toupper(*uname); strcat(*newname, ampersand+1); } else { char *uname = (*newname) + prefixlen; *uname = '\0'; } } and it would work better. That is, in the case where there wasn't a ``&'' in your pw_gecos field, the name wasn't null-terminated, and this causes the route-phrase in a validated address to have random garbage after it. All this was in the version with this RCS header: $Header: /afs/andrew.cmu.edu/usr13/cfe/src/ams/libs/ms/test/RCS/init.c,v 2.2 88/10/02 15:42:19 ghoti Exp $ Your mileage and line numbers may vary. Thanks, Craig Everhart
juo@cloud9.Stratus.COM (John Oleynick) (08/16/89)
Thanks for the messages help. I installed the fix a few days ago, and it works fine. I think I have figured out why vui would not read my mail. It looks like a minor bug in vui. I'm not sure if this has already been found and fixed, but here it is anyway. In andrew/ams/msclients/vui/vuipnl.c, GetCurrentDir seems to be missing a return statement. It's last statement sets the status, but it did not return anything. When Dir_Panel, in andrew/ams/msclients/vui/vui.c called GetCurrentDir, though, it checked the return value. I guess this usually worked by compiler luck, register allocation, etc. I made GetCurrentDir return the status value, and now it seems to work fine. Is this what it really should return? I also figured out why cui would not read my mail, it was because of "operator error". Here is what I changed. The change was around line 538 of andrew/ams/msclients/vui/vuipnl.c vuipnl.c: ... GetCurrentDir (current_dir, status, wantshort) char *current_dir, *status; Boolean wantshort; { char long_name[MAXPATHLEN+1], *long_name_p = long_name, *shortname; shortname = dir_data[N_DIR_FIELDS * DIR_CurrentRow].pdata; *current_dir = '\0'; if (wantshort) { strcpy(current_dir, shortname); debug((2,"Returning current directory of %s\n", shortname)); return(0); } ... CUI_CacheDirName(shortname, long_name_p); strcpy(current_dir, long_name_p); debug((2,"Returning current directory of %s\n", current_dir)); if (status!=NIL) (*status)=dir_data[1+N_DIR_FIELDS*DIR_CurrentRow].pdata[0]; return (*status); /* <-- Added this */ } ... John # John Oleynick juo@cloud9.stratus.com # # uunet!harvard!husc6!encore!cloud9!juo # # Snappy signature saying coming soon #