[2873] in Release_Engineering
xolc patch.
daemon@ATHENA.MIT.EDU (vanharen@MIT.EDU)
Thu Jun 11 10:23:46 1992
From: vanharen@MIT.EDU
Date: Thu, 11 Jun 92 10:23:29 EDT
To: rel-eng@MIT.EDU
The following patch fixes several things...
(1) if the krb tkt goes away at some point in the session, it handles
the problem more gracefully. most notably, if there is a tkt problem at
startup, it gives a warning telling the user to "renew", then the "try
again" actually *does* try again. previously, the "try again" button
was useless -- the program would exit. there are several other similar
patches made, but on the whole, this problem needs more work. since it
wasn't on the list to be done, though, I haven't made an all-out effort
to fix these things...
(2) in the "save log to file..." dialog, the delete key did not
function properly. as with the olh patch I submitted earlier, the
backspace key on the sun does not work in this dialog for reasons I
don't have time to figure out, but the delete key is functional on that
platform.
patches for xolc's stock answer browser follow in the next message.
-C.
diff -rbwc /source/athena/athena.bin/olc/clients/motif/main.c ./main.c
*** /source/athena/athena.bin/olc/clients/motif/main.c Thu Apr 23 18:02:41 1992
--- ./main.c Thu Jun 11 05:42:43 1992
***************
*** 213,218 ****
--- 213,219 ----
OInitialize();
+ try_again:
fill_request(&Request);
Request.request_type = OLC_STARTUP;
***************
*** 219,225 ****
status = open_connection_to_daemon(&Request, &fd);
if(status)
{
! handle_response(status, &Request);
exit(ERROR);
}
--- 220,227 ----
status = open_connection_to_daemon(&Request, &fd);
if(status)
{
! if (handle_response(status, &Request) == FAILURE)
! goto try_again;
exit(ERROR);
}
***************
*** 227,233 ****
--- 229,238 ----
if (status)
{
if ((handle_response(status, &Request)) == FAILURE)
+ {
close(fd);
+ goto try_again;
+ }
exit(ERROR);
}
read_response(fd, &response);
***************
*** 255,262 ****
case PERMISSION_DENIED:
MuErrorSync("You are not allowed to use OLC.\nPlease contact a consultant at 253-4435.");
exit(1);
default:
! if(handle_response(response, &Request) == ERROR)
exit(ERROR);
}
--- 260,274 ----
case PERMISSION_DENIED:
MuErrorSync("You are not allowed to use OLC.\nPlease contact a consultant at 253-4435.");
exit(1);
+
default:
! status = handle_response(response, &Request);
! if (status == FAILURE)
! {
! close(fd);
! goto try_again;
! }
! if (status == ERROR)
exit(ERROR);
}
diff -rbwc /source/athena/athena.bin/olc/clients/motif/procs.c ./procs.c
*** /source/athena/athena.bin/olc/clients/motif/procs.c Thu Apr 23 18:02:44 1992
--- ./procs.c Wed Jun 10 19:22:51 1992
***************
*** 594,602 ****
break;
}
XtSetArg(args[0], XmNsensitive, TRUE);
XtSetValues(w_motd_btn, args, 1);
!
unlink(file);
XtManageChild(w_motd_dlg);
STANDARD_CURSOR;
--- 594,603 ----
break;
}
+ /*
XtSetArg(args[0], XmNsensitive, TRUE);
XtSetValues(w_motd_btn, args, 1);
! */
unlink(file);
XtManageChild(w_motd_dlg);
STANDARD_CURSOR;
diff -rbwc /source/athena/athena.bin/olc/clients/motif/visual.c ./visual.c
*** /source/athena/athena.bin/olc/clients/motif/visual.c Thu Apr 23 18:02:46 1992
--- ./visual.c Wed Jun 10 19:27:14 1992
***************
*** 342,347 ****
--- 342,348 ----
XtAddCallback(w, XmNokCallback, save_cbk, 0);
XtAddCallback(w, XmNcancelCallback, save_cbk, 0);
XtDestroyWidget(XmSelectionBoxGetChild(w, XmDIALOG_HELP_BUTTON));
+ MuSetEmacsBindings(XmSelectionBoxGetChild(w, XmDIALOG_TEXT));
w = w_help_dlg = XmCreateInformationDialog(main_form, "help_dlg", NULL, 0);
XtAddCallback(w, XmNokCallback, dlg_ok, HELP_BTN);
diff -rbwc /source/athena/athena.bin/olc/clients/motif/x_ask.c ./x_ask.c
*** /source/athena/athena.bin/olc/clients/motif/x_ask.c Thu Apr 23 18:01:35 1992
--- ./x_ask.c Thu Jun 11 06:05:28 1992
***************
*** 41,46 ****
--- 41,47 ----
char file[MAXPATHLEN];
char buf[BUFSIZ];
+ try_again:
set_option(Request->options,VERIFY);
status = OAsk(Request,topic,NULL);
unset_option(Request->options, VERIFY);
***************
*** 92,98 ****
break;
default:
! if((status = handle_response(status, Request)) != SUCCESS)
return(ERROR);
}
--- 93,102 ----
break;
default:
! status = handle_response(status, Request);
! if (status == FAILURE)
! goto try_again;
! if (status != SUCCESS)
return(ERROR);
}
***************
*** 133,138 ****
--- 137,144 ----
default:
status = handle_response(status, Request);
+ if (status == FAILURE)
+ goto try_again;
break;
}
return(status);
diff -rbwc /source/athena/athena.bin/olc/clients/motif/x_instance.c ./x_instance.c
*** /source/athena/athena.bin/olc/clients/motif/x_instance.c Thu Apr 23 18:01:41 1992
--- ./x_instance.c Thu Jun 11 05:51:56 1992
***************
*** 36,41 ****
--- 36,42 ----
int instance;
int status;
+ try_again:
status = OGetDefaultInstance(Request,&instance);
switch(status)
{
***************
*** 45,51 ****
Request->requester.instance = instance;
break;
default:
! handle_response(status, Request);
break;
}
return(status);
--- 46,53 ----
Request->requester.instance = instance;
break;
default:
! if (handle_response(status, Request) == FAILURE)
! goto try_again;
break;
}
return(status);
diff -rbwc /source/athena/athena.bin/olc/clients/motif/x_motd.c ./x_motd.c
*** /source/athena/athena.bin/olc/clients/motif/x_motd.c Thu Apr 23 18:01:46 1992
--- ./x_motd.c Thu Jun 11 05:45:31 1992
***************
*** 51,56 ****
--- 51,57 ----
WAIT_CURSOR;
+ try_again:
Request->request_type = OLC_MOTD;
status = OGetFile(Request,type,file);
***************
*** 113,118 ****
--- 114,121 ----
default:
status = handle_response(status, Request);
+ if (status == FAILURE)
+ goto try_again;
break;
}