1. 30 Jul, 2020 2 commits
  2. 16 Jan, 2019 1 commit
  3. 05 Jul, 2018 1 commit
  4. 01 Jul, 2018 1 commit
  5. 28 Jun, 2018 1 commit
  6. 21 Jun, 2018 1 commit
  7. 20 Jun, 2018 2 commits
  8. 06 Apr, 2018 1 commit
  9. 27 Nov, 2017 1 commit
    • Nick Mathewson's avatar
      Add a new notion of "stamps" to be a fast 32-bit monotonic timestamp · c3c0a05f
      Nick Mathewson authored
      The goal here is to replace our use of msec-based timestamps with
      something less precise, but easier to calculate.  We're doing this
      because calculating lots of msec-based timestamps requires lots of
      64/32 division operations, which can be inefficient on 32-bit
      platforms.
      
      We make sure that these stamps can be calculated using only the
      coarse monotonic timer and 32-bit bitwise operations.
      c3c0a05f
  10. 27 Sep, 2017 1 commit
  11. 05 Sep, 2017 7 commits
    • Nick Mathewson's avatar
    • Nick Mathewson's avatar
      Refactor buffer APIs to put a buf_t first. · 6ec50597
      Nick Mathewson authored
      By convention, a function that frobs a foo_t should be called
      foo_frob, and it should have a foo_t * as its first argument.  But
      for many of the buf_t functions, the buf_t was the final argument,
      which is silly.
      6ec50597
    • Nick Mathewson's avatar
      Repair buffer API so everything starts with buf_. · 4a7e90ad
      Nick Mathewson authored
      Our convention is that functions which manipulate a type T should be
      named T_foo.  But the buffer functions were super old, and followed
      all kinds of conventions.  Now they're uniform.
      
      Here's the perl I used to do this:
      
      \#!/usr/bin/perl -w -i -p
      
      s/read_to_buf\(/buf_read_from_socket\(/;
      s/flush_buf\(/buf_flush_to_socket\(/;
      s/read_to_buf_tls\(/buf_read_from_tls\(/;
      s/flush_buf_tls\(/buf_flush_to_tls\(/;
      s/write_to_buf\(/buf_add\(/;
      s/write_to_buf_compress\(/buf_add_compress\(/;
      s/move_buf_to_buf\(/buf_move_to_buf\(/;
      s/peek_from_buf\(/buf_peek\(/;
      s/fetch_from_buf\(/buf_get_bytes\(/;
      s/fetch_from_buf_line\(/buf_get_line\(/;
      s/fetch_from_buf_line\(/buf_get_line\(/;
      s/buf_remove_from_front\(/buf_drain\(/;
      s/peek_buf_startswith\(/buf_peek_startswith\(/;
      s/assert_buf_ok\(/buf_assert_ok\(/;
      4a7e90ad
    • Nick Mathewson's avatar
      150089cb
    • Nick Mathewson's avatar
      Make buffers.c independent of or.h · 5921b465
      Nick Mathewson authored
      Also, put ext_or function in new module; it had accidentally gotten
      into proto_socks.c
      5921b465
    • Nick Mathewson's avatar
      Make buf_pullup() expose the pulled-up data. · f28e314b
      Nick Mathewson authored
      This lets us drop the testing-only function buf_get_first_chunk_data(),
      and lets us implement proto_http and proto_socks without looking at
      buf_t internals.
      f28e314b
    • Nick Mathewson's avatar
      Move protocol-specific functions out of buffers.c · 234c5015
      Nick Mathewson authored
      This commit does not change the implementation of any function: it
      only moves code and adds new includes as necessary.  Part of #23149.
      234c5015
  12. 24 Aug, 2017 1 commit
    • Alexander Færøy's avatar
      Fix operator usage in src/test/*.c · c4744a01
      Alexander Færøy authored and Nick Mathewson's avatar Nick Mathewson committed
      This patch fixes the operator usage in src/test/*.c to use the symbolic
      operators instead of the normal C comparison operators.
      
      This patch was generated using:
      
          ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
      c4744a01
  13. 21 Jun, 2017 1 commit
  14. 02 May, 2017 1 commit
    • Nick Mathewson's avatar
      Add unit tests for the NO_METHOD compressor · 3836d948
      Nick Mathewson authored
      These required some special-casing, since some of the assumption
      about real compression algorithms don't actually hold for the
      identity transform.  Specifically, we had assumed:
      
        - compression functions typically change the lengths of their
          inputs.
        - decompression functions can detect truncated inputs
        - compression functions have detectable headers
      
      None of those is true for the identity transformation.
      3836d948
  15. 01 May, 2017 1 commit
  16. 27 Apr, 2017 2 commits
  17. 17 Apr, 2017 4 commits
  18. 15 Mar, 2017 1 commit
  19. 14 Feb, 2017 1 commit
  20. 13 Sep, 2016 1 commit
  21. 02 Aug, 2016 2 commits
  22. 28 Jul, 2016 1 commit
  23. 21 Jul, 2016 1 commit
  24. 11 Jun, 2016 1 commit
    • Nick Mathewson's avatar
      Add -Wmissing-variable-declarations, with attendant fixes · 53a3b39d
      Nick Mathewson authored
      This is a big-ish patch, but it's very straightforward.  Under this
      clang warning, we're not actually allowed to have a global variable
      without a previous extern declaration for it.  The cases where we
      violated this rule fall into three roughly equal groups:
        * Stuff that should have been static.
        * Stuff that was global but where the extern was local to some
          other C file.
        * Stuff that was only global when built for the unit tests, that
          needed a conditional extern in the headers.
      
      The first two were IMO genuine problems; the last is a wart of how
      we build tests.
      53a3b39d
  25. 27 Feb, 2016 1 commit
  26. 02 Sep, 2015 1 commit
  27. 01 Sep, 2015 1 commit