Commit 527b760b authored by Kevin Bracey's avatar Kevin Bracey
Browse files

Tightened up checking of when sockets get opened and closed in an attempt to...

Tightened up checking of when sockets get opened and closed in an attempt to work out why Freeway gets upset when LanManFS is configured in IP mode.

Changed app date that OmniClient shows to be dd-mmm-yy
Added ability to include slimmer ROMSPRITES and deleted the resources
phase from the makefile: the sprites were being included once in
ResourceFS and again embedded in the module.
If the FS is unset it says so in *status rather than a blank line.

Version 2.26. Tagged as 'LanManFS-2_26'
parent 99169885
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 4000k
amu_machine rm.LanManFSD OPTIONS=-DCHECK_ARMBOOT_EXISTS
amu_machine rm.LanManFSD OPTIONS=-DCHECK_ARMBOOT_EXISTS SPRITES=RAM
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine install INSTDIR=<Install$Dir>
amu_machine install INSTDIR=<Install$Dir> ROMSPRITES=FALSE
......@@ -15,4 +15,4 @@
Dir <Obey$Dir>
wimpslot 8192k
rename i.instlib/c i.instlib
amu_machine instrument THROWBACK=-throwback
amu_machine instrument THROWBACK=-throwback ROMSPRITES=FALSE
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 8192k
amu_machine preprocess THROWBACK=-throwback
amu_machine preprocess THROWBACK=-throwback ROMSPRITES=FALSE
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 4000k
amu_machine all OPTIONS=-DCHECK_ARMBOOT_EXISTS
amu_machine all OPTIONS=-DCHECK_ARMBOOT_EXISTS ROMSPRITES=FALSE
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 4000k
amu_machine all OPTIONS="-DNO_NETBEUI -DCHECK_ARMBOOT_EXISTS"
amu_machine all OPTIONS="-DNO_NETBEUI -DCHECK_ARMBOOT_EXISTS" ROMSPRITES=TRUE
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
wimpslot 5000k
amu_machine rom
amu_machine rom ROMSPRITES=TRUE
......@@ -33,7 +33,7 @@ DBG_MODULE = rm.${TARGET}D
include StdTools
DFLAGS = -DCOMPAT_INET4 -DLONGNAMES ${OPTIONS}
AFLAGS = -depend !Depend ${THROWBACK} -Stamp -quit
AFLAGS = -depend !Depend ${THROWBACK} -Stamp -quit -predefine "ROMSPRITES SETL {${ROMSPRITES}}"
CFLAGS = -depend !Depend ${THROWBACK} -c -Wpcs -ff -zps1 -zM ${INCLUDES},. ${DFLAGS}
CMHGFLAGS = -depend !Depend ${THROWBACK} -p ${OPTIONS}
INCLUDES = -ITCPIPLibs:,C:
......@@ -100,9 +100,7 @@ rom: ${ROM_MODULE}
@echo ${COMPONENT}: rom module built
resources:
${MKDIR} ${RESDIR}.${TARGET}
${CP} LocalRes:Sprites ${RESDIR}.${TARGET}.Sprites ${CPFLAGS}
@echo ${COMPONENT}: resource files copied
@echo ${COMPONENT}: no resource files to copy
preprocess: ${OBJSI} i.dirs
@echo ${COMPONENT}: preprocess build complete
......
/* (2.25)
/* (2.26)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 2.25
#define Module_MajorVersion_CMHG 2.26
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 16 Jan 2003
#define Module_Date_CMHG 11 Mar 2003
#define Module_MajorVersion "2.25"
#define Module_Version 225
#define Module_MajorVersion "2.26"
#define Module_Version 226
#define Module_MinorVersion ""
#define Module_Date "16 Jan 2003"
#define Module_Date "11 Mar 2003"
#define Module_ApplicationDate "16-Jan-03"
#define Module_ApplicationDate "11-Mar-03"
#define Module_ComponentName "LanManFS"
#define Module_ComponentPath "RiscOS/Sources/Networking/Omni/Protocols/LanManFS"
#define Module_FullVersion "2.25"
#define Module_HelpVersion "2.25 (16 Jan 2003)"
#define Module_LibraryVersionInfo "2:25"
#define Module_FullVersion "2.26"
#define Module_HelpVersion "2.26 (11 Mar 2003)"
#define Module_LibraryVersionInfo "2:26"
......@@ -207,7 +207,7 @@ static void LM_Undeclare ( void )
static void LM_GracefulClosedown(void)
{
if (LM_Vars.initialised == LMInitState_FullyInited) {
/*if (LM_Vars.initialised == LMInitState_FullyInited)*/ {
stopcallbacks();
SMB_Shutdown(); /* Dismounts all SMB mounts first as */
Omni_Shutdown(); /* Omni_Shutdown zeros the Mounts lists */
......@@ -644,7 +644,7 @@ static _kernel_oserror *Cmd_FS ( const char *args )
{
char buf[NAME_LIMIT];
GetFSName(buf);
printf("FS %s\n", buf);
printf("FS %s\n", buf[0] ? buf : "<unset>");
return NULL;
}
......@@ -1052,7 +1052,6 @@ _kernel_oserror *LM_Initialise(const char *cmd_tail, int pod_base, void *pw)
debug_atexit();
debug_set_options(0,0,0);
debug_output_device(DEBUGIT_OUTPUT);
LM_Vars.initialised = LMInitState_Uninitialised;
(void)pod_base;
......@@ -1243,7 +1242,7 @@ static void LM_check_driver_status(_kernel_swi_regs *r)
else {
debug0("Ding! This was our interface\n");
if (r->r[2] == 0) {
if (LM_Vars.initialised == LMInitState_FullyInited) {
/*if (LM_Vars.initialised == LMInitState_FullyInited)*/ {
LM_GracefulClosedown();
}
LM_init_phase_2();
......@@ -1342,7 +1341,7 @@ static void LM_check_internet_status(_kernel_swi_regs *r)
if (r->r[2] != 1) return;
}
if (LM_Vars.initialised == LMInitState_FullyInited) {
/*if (LM_Vars.initialised == LMInitState_FullyInited)*/ {
/* Should never happen nowadays ?? */
LM_GracefulClosedown();
}
......
......@@ -62,7 +62,6 @@
#define EXPORT static
/* Our definitions ------------------ */
#define EventV 0x10
......@@ -1210,12 +1209,18 @@ int EventFn_handler ( _kernel_swi_regs *R, void *pw )
{
STAT(STA_IP_EVENTS);
CallbackSet = true;
_swi(OS_AddCallBack, _INR(0,1), NBIP_CallbackFn, LM_pw);
_swix(OS_AddCallBack, _INR(0,1), NBIP_CallbackFn, LM_pw);
}
return 1; /* Don't claim, others may wish to know */
}
static void RemoveCallbacks(void)
{
_swix(OS_RemoveCallBack, _INR(0,1), NBIP_CallbackFn, LM_pw);
CallbackSet = false;
}
/* -------------------------------- */
int NBIP_CallbackFn_handler(void)
......@@ -2040,8 +2045,8 @@ EXPORT void _NB_Shutdown(void)
if ( EventsClaimed )
{
EventsClaimed = false;
_swi(OS_Release, _INR(0,2), EventV, (int)EventFn, LM_pw);
_swi(OS_Byte, _INR(0,1), 13, Internet_Event); /* Disable event */
_swix(OS_Release, _INR(0,2), EventV, (int)EventFn, LM_pw);
_swix(OS_Byte, _INR(0,1), 13, Internet_Event); /* Disable event */
}
if ( NBNS_Socket != INVALID_SOCKET )
......@@ -2056,6 +2061,8 @@ EXPORT void _NB_Shutdown(void)
socketclose ( NB_Sessions[i].sid );
NB_Sessions[i].status = SESS_FREE;
}
RemoveCallbacks();
}
/* NB_Startup() -----------------------------------------------------
......@@ -2076,6 +2083,7 @@ static struct sockaddr_in Broadcast_sin;
EXPORT err_t _NB_Startup(void)
{
err_t res;
int i;
struct sockaddr_in sa;
struct ifreq IFR;
......@@ -2173,18 +2181,25 @@ EXPORT err_t _NB_Startup(void)
/* It's now ready for action - set up internet event handler */
CallbackSet = false;
_swi(OS_Claim, _INR(0,2), EventV, (int) EventFn, LM_pw);
_swi(OS_Byte, _INR(0,1), 14, Internet_Event); /* Enable event */
/*CallbackSet = false;*/
if (!EventsClaimed)
{
_swix(OS_Claim, _INR(0,2), EventV, (int) EventFn, LM_pw);
_swix(OS_Byte, _INR(0,1), 14, Internet_Event); /* Enable event */
EventsClaimed = true;
debug0("Events claimed\n");
}
// strcpy ( LM_Vars.drivername, "TCP/IP");
/* Now try to register name... */
debug1("Setting our local name as `%s'\n", LM_Vars.machinename);
return _NB_AddLocalName ( ntMACHINE, LM_Vars.machinename, &NB_MachineName);
res = _NB_AddLocalName ( ntMACHINE, LM_Vars.machinename, &NB_MachineName);
if (res != OK)
_NB_Shutdown();
return res;
}
/* NB_InternetGone() ---------------------------
......@@ -2201,12 +2216,14 @@ static void _NB_InternetGone(void)
for (i=0; i < MAX_SESSIONS; ++i) {
if (NB_Sessions[i].status == SESS_CONNECTED) {
NB_Sessions[i].sid = -1;
NB_Sessions[i].sid = INVALID_SOCKET;
NB_Sessions[i].LinkOK = false;
}
}
NBNS_Socket = INVALID_SOCKET;
RemoveCallbacks();
}
/* NB_InternetInit() ---------------------------
......@@ -2228,7 +2245,7 @@ static void _NB_InternetInit(void)
for (i=0; i < MAX_SESSIONS; ++i) {
if (NB_Sessions[i].status == SESS_CONNECTED) {
NB_Sessions[i].sid = -1;
NB_Sessions[i].sid = INVALID_SOCKET;
NB_Sessions[i].LinkOK = false;
}
}
......
......@@ -1678,13 +1678,12 @@ void Omni_Debug ( void )
{
NAMELIST *pNL;
printf("LanManFS version " VERSION_STRING
"\nOmniClient %sstarted\n"
"Machine name : %s\n"
"Driver name : %s\n",
Omni_Registered ? "" : "not ",
printf("Machine name : %s\n"
"Driver name : %s\n"
"OmniClient : %sstarted\n",
LM_Vars.machinename,
LM_Vars.drivername );
LM_Vars.drivername,
Omni_Registered ? "" : "not " );
if ( LM_Vars.logged_on )
{
......
......@@ -111,5 +111,7 @@
* 1.86 28-Jul-98 RCE Added support for NetBIOS Name Server IP address in CMOS
*/
#define VERSION_STRING Module_VersionString " (" Module_Date ")"
#include "VersionNum"
#define VERSION_STRING Module_VersionString " (" Module_ApplicationDate ")"
......@@ -284,7 +284,13 @@ OmniS_ResFSStarting ; (int R2, int R3 )
; Data block
Resource_Base
[ ROMSPRITES
; Slim or low res sprites in ROM to save space
ResourceFile "LocalRes:ROM.Sprites", "ThirdParty.OmniClient.LanMan.Sprites"
|
; Deep colour high res sprites for RAM modules
ResourceFile "LocalRes:Sprites", "ThirdParty.OmniClient.LanMan.Sprites"
]
DCD 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment