• Nathaniel Wesley Filardo's avatar
    Simplify and tidy SNTP (#2700) · 7d387dd4
    Nathaniel Wesley Filardo authored
    * list_ref can become LUA_REFNIL, because that's what rawgeti returns
      for LUA_NOREF.  Defensively guard for this, rather than falling into
      the sntp_dolookups loop with nil on the stack.
    
    * set_repeat_mode should not call itself, but should rather always do
      what it's going to do and then optionally do the rest if directed.
    
    * sntp_sync should not try to special case the single string argument:
      we should be queueing that name for DNS resolution, too.  Towards that
      end, if we are given a single string, build a table and make that the
      list_ref and call off to sntp_dolookups, just like we otherwise do.
    
    FIXES: #2699
    7d387dd4
sntp.c 24.8 KB