1. 30 Nov, 2019 1 commit
    • Robert Sprowson's avatar
      Fix for claiming other socket's internet events · 9a0d8417
      Robert Sprowson authored
      Various sloppy management of the socket number meant that NetTime would erroneously claim the internet event for a socket it wasn't using (either before use, or in certain circumstances after use).
      
      In the case observed, socket 0 is opened by a ROM module (DHCP), then NetTime is loaded from disc but not yet attempting a connect (eg. link is down so the state machine idle) the event handler is then higher up the event chain and catching socket 0 events. Subsequent attempts to use DHCP then fail because it never gets the async replies on its socket.
      
      machine.c: Set global sockno to -1 before use. Check the return value of socket() before merrily applying socket options. On closing, set sockno back to -1 via utility function closeconnect().
      
      Version 0.44. Tagged as 'NetTime-0_44'
      9a0d8417
  2. 28 Nov, 2013 1 commit
  3. 24 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Delagate RTC adjustments to RTC module when present · a979130c
      Robert Sprowson authored
      When the RTC module is present don't try making the duplicate adjustments in this module, while largely harmless the status report would likely be out of sync as the two modules battle eachother for who can poke timer 0 more often.
      Changed files
       machine.c: double quotes in debug text removed
       ntp.c: use some named defines for OS_Hardware calls
       Spec: typo correction
       rtcadjust.c: when RTC module is active, delagate adjustments to RTC_Adjust SWI
      
      Tested on a Risc PC over 24 hours.
      
      Version 0.42. Tagged as 'NetTime-0_42'
      a979130c
  4. 17 Nov, 2013 1 commit
    • Robert Sprowson's avatar
      Reverse the sense of the NetTime offset · be3ad11b
      Robert Sprowson authored
      Rather than requiring a unary minus in rtcadjust, simply work out the offset the other way round (+ve means the RISC OS soft clock is fast compared with real time).
      
      Version 0.41. Tagged as 'NetTime-0_41'
      be3ad11b
  5. 10 Apr, 2012 1 commit
    • Robert Sprowson's avatar
      Past state from NetTime_States was always zero. · 8cd9b86f
      Robert Sprowson authored
      No longer trampled on by the current state, therefore reports the correct last state when the link is down. Also marks the last set as unsuccessful on every DNS lookup just incase someone kills the resolver too.
      
      Version 0.40. Tagged as 'NetTime-0_40'
      8cd9b86f
  6. 04 Mar, 2012 1 commit
  7. 25 Feb, 2012 2 commits
    • Robert Sprowson's avatar
      No need to set a default value for Nettime$DST now. · b21a5576
      Robert Sprowson authored
      Retagged.
      b21a5576
    • Robert Sprowson's avatar
      Remove DST CMOS fiddling code. · 43a72fb6
      Robert Sprowson authored
      Shortly to be handled by TerritoryManager, but the DST fiddling in this module was already broken. Aside from only knowing about Europe and Australia, the Australia rules were wrong too (since they've been changed again).
      dhcp.c: use names for timezone CMOS rather than magic numbers.
      Rework read_os_var() to remove the 'read length when buff = NULL' which is never used, but also wouldn't have worked because the read length call to OS_ReadVarVal returns an error which is caught by the _swix() hence you always got -1.
      Put resolver variable name into a define in the header file.
      
      Version 0.39. Tagged as 'NetTime-0_39'
      43a72fb6
  8. 12 Feb, 2012 1 commit
    • Robert Sprowson's avatar
      Exports added. · c1be03eb
      Robert Sprowson authored
      SWI numbers and some bit fields for both C and assembler use.
      
      Version 0.38. Tagged as 'NetTime-0_38'
      c1be03eb
  9. 04 Feb, 2012 1 commit
    • Robert Sprowson's avatar
      Add SWI NetTime_States. · bfd029c0
      Robert Sprowson authored
      Makefile changed to use "CModule" fragment.
      Soak up some compiler warnings.
      Extralong functions removed.
      Use central header files in preference to local defines.
      A failure to register resources no longer leaves EventV and WordV claimed.
      
      Version 0.37. Tagged as 'NetTime-0_37'
      bfd029c0
  10. 17 Jan, 2005 1 commit
  11. 17 Oct, 2004 1 commit
    • Steve Revill's avatar
      Different change to the problems with servers without primary sync. · 7cd11600
      Steve Revill authored
      Detail:
        We now simply keep a flag indicating if we have ever seen the configured
        NTP server with primary sync. While the flag is FALSE, we will accept NTP
        responses more flexibly. For example, we ignore leap indicator of 3 or
        stratum of zero or greater than 14.
      Admin:
        Works as hoped with the servers at Customer A.
      
      Version 0.35. Tagged as 'NetTime-0_35'
      7cd11600
  12. 14 Oct, 2004 1 commit
    • Steve Revill's avatar
      Slight change to NTP behaviour. · c9f44c9d
      Steve Revill authored
      Detail:
        NetTime will accept NTP responses from servers which do not have
        primary sync until and after they gain it. It will not accept the
        response from a server whos stratum increases, for example when
        it loses primary sync.
      Admin:
        Tested on Iyonix and works as desired without breaking existing
        behaviour.
      
      Version 0.34. Tagged as 'NetTime-0_34'
      c9f44c9d
  13. 14 Jun, 2004 1 commit
  14. 19 May, 2004 1 commit
    • Kevin Bracey's avatar
      * Added support for non-IOMD, HAL-based platforms. · e58bcddd
      Kevin Bracey authored
      * Improved *NetTime_PollInterval to make sure next poll happens at
        the expected time.
      * On module init, no longer sets the time from the NVRAM if the current
        time seems sensible (ie >= 2003ish).
      * Sets the time NVRAM on shutdown (was only on packet reception).
      
      Version 0.32. Tagged as 'NetTime-0_32'
      e58bcddd
  15. 23 Jul, 2002 1 commit
  16. 25 Apr, 2002 1 commit
    • Steve Revill's avatar
      * Fixed all of the !Mk... files. · fafe09ae
      Steve Revill authored
        * Now builds with the latest TCPIPLibs.
      Detail:
        * All of the !Mk... files are required to pass TARGET into the makefile.
        * The new TCPIPLibs use the standard types.h from RISC_OSLib if it is
          available. This defines u_int32 types using int rather than long, which
          TCPIPLibs uses. Thus, NetTime needed a little tweaking to adjust for
          this change.
      Admin:
        Builds.
        Requires TCPIPLibs-5_42 or later.
      
      Version 0.30. Tagged as 'NetTime-0_30'
      fafe09ae
  17. 06 Oct, 2000 1 commit
    • Stewart Brodie's avatar
      Fixed CMHG header to contain correct SWI chunk information. · fa14f8f6
      Stewart Brodie authored
      Detail:
        A non-existent header file was being included to define the SWI chunk
          information.  This is no longer done.
        Build tidied up a bit.
      Admin:
        Built a ROM module and tested fake linking it.
        Built a RAM module (it'll fail due to lack of Messages file though)
      
      Version 0.29. Tagged as 'NetTime-0_29'
      fa14f8f6
  18. 08 Sep, 2000 1 commit
  19. 06 Sep, 2000 1 commit
    • David Cotton's avatar
      Now builds. Updated documentation. · 9a7444bb
      David Cotton authored
      Detail:
      	Last checkin did not include the file adst.o in the makefile, meaning
      that a routine was not being linked against.
      	Updated the Functional Specification with the latest changes.
      	c.module now uses the global countries header file to get Australia#s
      territory number, rather than using the hard-coded value of 29.
      Admin:
      	Tested.
      
      Version 0.26. Tagged as 'NetTime-0_26'
      9a7444bb
  20. 01 Aug, 2000 1 commit
    • Justin Fletcher's avatar
      Added Australian Rules DST. · d8ff45a8
      Justin Fletcher authored
      Detail:
        * If NetTime$DST is set to Australian, instead of European, the
          Australian rules for daylight saving time are applied.
      Admin:
        * Tested, and appears to work as expected.
        * Included documentation from Australian legislature detailing the
          changes for DST, and the special case for 2000. Not really required
          for projects at present, but useful to be correct nonetheless.
      
      Version 0.25. Tagged as 'NetTime-0_25'
      d8ff45a8
  21. 21 Jul, 2000 1 commit
    • John Beranek's avatar
      Bug fix for time server off smartcard · b016331f
      John Beranek authored
      Detail:
        Protocol auto determination when using a time server specified off
         a smart card was only being done if the time server on the
         smart card was a packed IP address.  If the time server was a
         string, auto determination wasn't being done.  Behaviour changed
         so that auto determination will be done for any smart card format.
      
      Admin:
        Tested on Customer F5 softload.
        Fixes Pace 1618
      
      
      Version 0.24. Tagged as 'NetTime-0_24'
      b016331f
  22. 20 Mar, 2000 1 commit
  23. 16 Mar, 2000 1 commit
  24. 15 Mar, 2000 1 commit
  25. 07 Mar, 2000 2 commits
    • Kevin Bracey's avatar
      27b0dd33
    • Kevin Bracey's avatar
      Added support for NTP, gradual time adjustment, configurable DST, and DHCP timezone. · 37c23db9
      Kevin Bracey authored
      Detail:
        If Inet$NTPServer is set, NetTime will use NTP (unicast SNTP, as per RFC2030).
        Otherwise it will use the UDP time protocol (it used to use TCP).
      
        NetTime will use the RTCAdjust algorithms to adjust the centisecond clock
        rate by +/-10% to get in step with the time server. By polling every 30
        minutes on a LAN, time will not deviate by more than 0.1 seconds once
        synchronised. It interoperates with RTCAdjust and the hardware RTC to ensure
        correct operation on a machine with RTC.
      
        NetTime has returned to polling every 30 minutes. This may defeat PPP
        timeouts - a suggested fix is to change PPP to only have TCP traffic keep the
        link up, or to have a separate user inactivity timeout (like Lazarus).
      
        The system variable NetTime$DST controls DST behaviour. Set to "European"
        (the default) to use European rules. Set it to something like
        "03-May-2000.01:00:00; 14-Sep-2000.01:00:00" to specify this year's start
        and end dates (in UTC). Set to "No" to make it leave DST alone.
      
        If a DHCP reply arrives while NetTime is loaded, it will check for the time
        offset option - if present, the timezone will be configured.
      
        New command *NetTime_Status gives information about the clock adjustments.
      
        NetTime attempts to start operation immediately on a non-dialup machine -
        removes the need for a *NetTime_Kick after softloading. *NetTime_Kick will
        still be required after, say, setting Inet$NTPServer manually.
      
      Admin:
        Tested on desktop systems and STBs. NTP operation on an NC will require a
        way of finding out an NTP server - possibly redefining TIME_SERVER smartcard
        tag to be NTP? Anycast operation may also be worth adding.
      
      Version 0.20. Tagged as 'NetTime-0_20'
      37c23db9
  26. 05 Jul, 1999 1 commit
    • David Cotton's avatar
      NetTime now looks at the Inet$TimeServer system variable before looking at the... · d0106600
      David Cotton authored
      NetTime now looks at the Inet$TimeServer system variable before looking at the NetTime$Server variable or the smartcard.
      
       	This fixes a bug where the server was not getting set if there was
      not a time server on the smartcard (or it was present but was not a valid
      DNS) as the Inet$TimeServer was not being looked at.
      
      Detail:
       	When attempting to locate a server to gain the time from, it now does
      it on the following order:
       	* Checks the Inet$TimeServer system variable first;
       	* If not present, checks the NetTime$Server system variable;
       	* If not present, finally attmepts to get the server off the
      smartcard.
      
      Admin:
       	Tested as a softload on an ethernet Customer M box.
      
      Version 0.16. Tagged as 'NetTime-0_16'
      d0106600
  27. 09 Jun, 1999 3 commits
  28. 08 Apr, 1999 1 commit
    • David Cotton's avatar
      Added a header file, debug.h, that is used to redefine some debuglib macros if... · 15d8090c
      David Cotton authored
      Added a header file, debug.h, that is used to redefine some debuglib macros if a non-debug build is being built. This is to allow the module to be built on machines where debuglib is not present.
      
      Validated by building both the old (v0.12) and new versions and ensuring that
      the non-debug versions were identical. Also checked that the debug version
      still built.
      
      Version 0.13. Tagged as 'NetTime-0_13'
      15d8090c
  29. 04 Mar, 1999 1 commit
  30. 13 Jan, 1999 1 commit
  31. 14 Dec, 1998 1 commit
  32. 01 Dec, 1998 2 commits
    • John Farrell's avatar
      Make debug soft-load module. · 1c6f541b
      John Farrell authored
      1c6f541b
    • John Farrell's avatar
      Make DNS lookup non-blocking: · 7812f862
      John Farrell authored
        New state (DNSWait) and internal transition (DoDNS) added.
        Machine now support internal transitions, and DoDNS is injected by
        transitions that previously called tryconnect() to start lookup.
        State DNSWait polls resolver every second while it returns EINPROGRESS.
        Resolver interface (dns.c) taken from Acorn FTP fetcher.
      
      Version 0.09. Tagged as 'NetTime-0_09'
      7812f862
  33. 24 Nov, 1998 3 commits