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:
......@@ -67,10 +67,10 @@ LanMan_MH.h: LanMan_MH.o
#
.SUFFIXES: .o .od .or .s .c .i .h .cmhg .inst
.c.o:; ${CC} ${CFLAGS} -o $@ $<
.c.or:; ${CC} ${CFLAGS} -DROM -o $@ $<
.c.od:; ${CC} ${CFLAGS} -DDEBUG -DDEBUGLIB -DTRACE -Dprintf=module_printf -o $@ $<
.c.i:; $(CC) $(CFLAGS) -c -C -E $< >> $@
.i.inst:; $(CC) $(CFLAGS) -C++ -o $@ $<
.c.or:; ${CC} ${CFLAGS} -DROM -o $@ $<
.c.od:; ${CC} ${CFLAGS} -DDEBUG -DDEBUGLIB -DTRACE -Dprintf=module_printf -o $@ $<
.c.i:; $(CC) $(CFLAGS) -c -C -E $< >> $@
.i.inst:; $(CC) $(CFLAGS) -C++ -o $@ $<
.cmhg.o:; ${CMHG} ${CMHGFLAGS} -o $@ $< -d $*.h
.cmhg.h:; ${CMHG} ${CMHGFLAGS} -o $@ -d $<
.s.o:; ${AS} ${AFLAGS} $< $@
......@@ -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 */
EventsClaimed = true;
debug0("Events claimed\n");
/*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 )
{
......
......@@ -58,7 +58,7 @@
* If using Inet$HostName, truncate at first '.'
* Get Mount Info user name bug fix.
* 1.57 22-Aug-95 Stats added. *LMStats command. Tx window size in
* LLC reduced to 1. T1 retries increased to 20.
* LLC reduced to 1. T1 retries increased to 20.
* 1.58 07-Sep-95 Auto-reconnect started.
* 1.59 15-Sep-95 "Reject" storms cured. SMB internals rearranged.
* 1.60 22-Sep-95 Password/authentication on OS/2 Lanman works
......@@ -67,20 +67,20 @@
* added NB_GetBlockData, rearranged startup.
* 1.63 01-Feb-96 Working title of alpha IP version
* 1.64 02-Feb-96 Both versions titled LanManFS, IP browsing works,
* more 'verbose' bits added.
* more 'verbose' bits added.
* 1.65 27-Mar-96 LanManIP abort when killing module fixed. !ArmBoot
* file running added. Autoboot on startup added.
* Alex' strange bugs fixed. *Status/Configure FS.
* file running added. Autoboot on startup added.
* Alex' strange bugs fixed. *Status/Configure FS.
* 1.66 02-Apr-96 New name-to-IP address discovery added to LanManIP
* 1.67 11-Apr-96 Filer_runs the !Armboot file if we're in the desktop
* 1.68 26-Apr-96 Combined NetBEUI & TCPIP transports. Starts TCP/IP
* without needing host name set. Transact SWI added.
* without needing host name set. Transact SWI added.
* 1.69 07-Jun-96 Added 'Logon' Omni icon bits. New icons not drawn yet.
* 1.70 12-Jun-96 'Logoff' OmniOp added. Sprites added.
* 1.71 13-Jun-96 Invalidates attribute cache on drive change.
* 1.72 02-Jul-96 OmniOp 8 changes for automatic logon.
* 1.73 25-Jul-96 Now does home dir logon. Does disconnect/reconnect if
* password changed.
* password changed.
* 1.74 29-Jul-96 GetDomainController() bug fixed
* 1.75 07-Nov-96 'Configure LMtransport' CMOS bit moved; server name
* in CMOS no longer conflicts with AUN; 'Account
......@@ -92,24 +92,26 @@
* 1.78 09-Dec-96 NAS Minor tweak to domain logon in Logon.c - doesn't return
* serious login error if home directory invalid
* 1.79 28-Jan-97 NAS Changed error for 'directory not empty' from 47 to &b4
* to fix NET-01359.
* Also got 'Access not allowed' error returning &b4 because
* some servers use that error for delete attempts
* to fix NET-01359.
* Also got 'Access not allowed' error returning &b4 because
* some servers use that error for delete attempts
* 1.80 10-Feb-97 NAS Fixed NET-01319 to read/write configured server name to
* correct location in CMOS
* correct location in CMOS
* 1.81 20-Mar-97 NAS Fixed NET-01364 wasn't checking Ctrl-terminator on command
* tail string (broke *RMLoad under RISC OS 3.1)
* tail string (broke *RMLoad under RISC OS 3.1)
* 1.82 26-Mar-97 INH SMB_getatr command unusable under NT4.0; uses directory
* search instead (fixed a timestamp bug under NT4).
* 1.83 21-Apr-97 INH W95 timestamping bugs fixed: (i) File time set to 1 Jan
* 1970 on file close, (ii) SetAttrib call wouldn't set
* the time (now do it by opening & closing file)
* 1970 on file close, (ii) SetAttrib call wouldn't set
* the time (now do it by opening & closing file)
* 1.84 27-Jan-98 RCE Added initialisation of parameters from CMOS (if set).
* Also translated RISCOS_Lib os_swi calls to clib _swi,
* and added 'preinit' state.
* Also translated RISCOS_Lib os_swi calls to clib _swi,
* and added 'preinit' state.
* 1.85 24-Jul-98 RCE Added trap for STB OS setting Inet$HostName to ARM_NoName
* 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 ")"
......@@ -217,33 +217,33 @@ Free_ServiceRoutine ; On entry R0 = reason code 0-3
TEQ R1,#0 ; set Z if R1 was 0 on exit, preserve V
LDMFD SP!, {R1, R4, PC} ; As it says in book
DCB "Nothing libellous or obscene", 0 ; Contractual obligation
ALIGN
DCB "Nothing libellous or obscene", 0 ; Contractual obligation
ALIGN
; Collect callbacks routine ------------------------------
; Long multiplier ----------------------------------------
; Taken from Acorn Assembler manual.
; extern void OmniS_FastMultiply64(fspc_64 *, unsigned, unsigned);
EXPORT OmniS_FastMultiply64
EXPORT OmniS_FastMultiply64
OmniS_FastMultiply64
FunctionEntry
STMFD sp!, {lr}
MOVS lr, a2, LSR #16
BIC a2, a2, lr, LSL #16
MOV ip, a3, LSR #16
BIC a3, a3, ip, LSL #16
MUL a4, a2, a3
MUL a3, lr, a3
MUL a2, ip, a2
MULNE lr, ip, lr
ADDS a2, a2, a3
ADDCS lr, lr, #&10000
ADDS a4, a4, a2, LSL #16
ADC lr, lr, a2, LSR #16
STMIA a1, {a4, lr}
Return
STMFD sp!, {lr}
MOVS lr, a2, LSR #16
BIC a2, a2, lr, LSL #16
MOV ip, a3, LSR #16
BIC a3, a3, ip, LSL #16
MUL a4, a2, a3
MUL a3, lr, a3
MUL a2, ip, a2
MULNE lr, ip, lr
ADDS a2, a2, a3
ADDCS lr, lr, #&10000
ADDS a4, a4, a2, LSL #16
ADC lr, lr, a2, LSR #16
STMIA a1, {a4, lr}
Return
......@@ -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