1. 06 May, 2020 3 commits
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 28ac17f4
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.2 version.)
      28ac17f4
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 79ff2b6a
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.1 version.)
      79ff2b6a
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · cc397449
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      cc397449
  2. 30 Sep, 2019 1 commit
  3. 16 Jan, 2019 2 commits
  4. 14 Nov, 2018 1 commit
  5. 21 Sep, 2018 1 commit
    • Nick Mathewson's avatar
      Split main.c into main.c and mainloop.c · c7ce6b98
      Nick Mathewson authored
      The main.c code is responsible for initialization and shutdown;
      the mainloop.c code is responsible for running the main loop of Tor.
      
      Splitting the "generic event loop" part of mainloop.c from the
      event-loop-specific part is not done as part of this patch.
      c7ce6b98
  6. 09 Jul, 2018 1 commit
  7. 05 Jul, 2018 3 commits
    • Nick Mathewson's avatar
      Fix every include path changed in the previous commit (automated) · ef486e3c
      Nick Mathewson authored
      I am very glad to have written this script.
      ef486e3c
    • Nick Mathewson's avatar
      Move literally everything out of src/or · 63b4ea22
      Nick Mathewson authored
      This commit won't build yet -- it just puts everything in a slightly
      more logical place.
      
      The reasoning here is that "src/core" will hold the stuff that every (or
      nearly every) tor instance will need in order to do onion routing.
      Other features (including some necessary ones) will live in
      "src/feature".  The "src/app" directory will hold the stuff needed
      to have Tor be an application you can actually run.
      
      This commit DOES NOT refactor the former contents of src/or into a
      logical set of acyclic libraries, or change any code at all.  That
      will have to come in the future.
      
      We will continue to move things around and split them in the future,
      but I hope this lays a reasonable groundwork for doing so.
      63b4ea22
    • Nick Mathewson's avatar
      2d69c32b
  8. 01 Jul, 2018 1 commit
  9. 28 Jun, 2018 1 commit
  10. 20 Jun, 2018 2 commits
  11. 15 Jun, 2018 1 commit
  12. 05 Apr, 2018 1 commit
  13. 02 Feb, 2018 1 commit
  14. 01 Feb, 2018 1 commit
  15. 31 Jan, 2018 1 commit
    • David Goulet's avatar
      ns: Add a before and after consensus has changed notification · fbc455cb
      David Goulet authored
      In 0.3.2.1-alpha, we've added notify_networkstatus_changed() in order to have
      a way to notify other subsystems that the consensus just changed. The old and
      new consensus are passed to it.
      
      Before this patch, this was done _before_ the new consensus was set globally
      (thus NOT accessible by getting the latest consensus). The scheduler
      notification was assuming that it was set and select_scheduler() is looking at
      the latest consensus to get the parameters it might needs. This was very wrong
      because at that point it is still the old consensus set globally.
      
      This commit changes the notify_networkstatus_changed() to be the "before"
      function and adds an "after" notification from which the scheduler subsystem
      is notified.
      
      Fixes #24975
      fbc455cb
  16. 11 Dec, 2017 8 commits
  17. 17 Nov, 2017 2 commits
  18. 06 Nov, 2017 1 commit
  19. 02 Nov, 2017 2 commits
  20. 19 Oct, 2017 1 commit
    • Nick Mathewson's avatar
      Comment-only change: annotate exit() calls. · 35746a9e
      Nick Mathewson authored
      Sometimes when we call exit(), it's because the process is
      completely hopeless: openssl has a broken AES-CTR implementation, or
      the clock is in the 1960s, or something like that.
      
      But sometimes, we should return cleanly from tor_main() instead, so
      that embedders can keep embedding us and start another Tor process.
      
      I've gone through all the exit() and _exit() calls to annotate them
      with "exit ok" or "XXXX bad exit" -- the next step will be to fix
      the bad exit()s.
      
      First step towards 23848.
      35746a9e
  21. 03 Oct, 2017 1 commit
  22. 25 Sep, 2017 2 commits
  23. 22 Sep, 2017 2 commits