Allow AFPBridge init to work when loaded before the TCPIP init.

In that case, LoadOneTool returns an error, but the tool stub is still loaded, which is good enough (we just need its FPT to be loaded and installed in the TPT).
This commit is contained in:
Stephen Heumann 2017-04-15 23:01:48 -05:00
parent a52a041389
commit e5c1cd4465
1 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,8 @@
#include <appletalk.h>
#include <locator.h>
#include <misctool.h>
#include <tcpip.h>
#include <desk.h>
#include <orca.h>
#include <gsos.h>
@ -9,6 +11,8 @@
#include "aspinterface.h"
#include "asmglue.h"
const char bootInfoString[] = "AFPBridge v1.0b1";
extern Word *unloadFlagPtr;
FSTInfoRecGS fstInfoRec;
@ -48,9 +52,16 @@ int main(void) {
goto error;
}
LoadOneTool(54, 0x0300); /* load Marinetti 3.0+ */
if (toolerror())
/*
* Load Marinetti.
* We may get an error if the TCPIP init isn't loaded yet, but we ignore it.
* The tool stub is still loaded in that case, which is enough for now.
*/
LoadOneTool(54, 0x0200);
if (toolerror() && toolerror() != terrINITNOTFOUND)
goto error;
ShowBootInfo(bootInfoString, NULL);
/*
* Put Marinetti in the default TPT so its tool stub won't be unloaded,