Skip to content
Snippets Groups Projects
  1. Mar 01, 2018
    • Irene Y Zhang's avatar
      Merge branch 'no_goto_fail' into 'master' · 26dbe6c2
      Irene Y Zhang authored
      Removed `goto fail` code with `unique_ptr`.
      
      See merge request !3
      26dbe6c2
    • Michael Whittaker's avatar
      Removed `goto fail` code with `unique_ptr`. · 4ceab25d
      Michael Whittaker authored
      Previously, `UDPTransport::SendMessageInternal` dynamically allocated a
      `char[]` and used a `goto fail` to make sure that it was properly
      deleted. Something like:
      
      ```c++
          char *buf = new char[100];
          if (...) {
              ...
              goto fail;
          } else if (...) {
              ...
              goto fail;
          } else {
              ...
          }
      
      fail:
           delete [] buf;
           return false;
      ```
      
      Now, the array is stored in a `unique_ptr` so that it's properly
      deallocated when the function returns, without needing the goto fail.
      4ceab25d
  2. Feb 28, 2018
  3. Feb 22, 2018
  4. Nov 17, 2017
    • Irene Zhang's avatar
      Merge pull request #8 from mwhittaker/lockserver_client_fixes · 46488d1b
      Irene Zhang authored
      A couple small lockserver client improvements.
    • Michael Whittaker's avatar
      A couple small lockserver client improvements. · 679fcb9f
      Michael Whittaker authored
      1. Previously, typing ` `, `lock`, or `unlock` into a lockserver
         client's REPL would cause the client to crash because of some
         `strtok` calls that were returning `NULL`. Now, this bug is fixed;
         `strtok` returns are checked to be `NULL`, and no input should crash
         the client.
      2. Previously, typing in an unrecognized command into the lockserver
         client's repl would print `Unknown command.. Try again!`. Now, it
         also prints out the set of legal commands `Usage: exit | q | lock
         <key> | unlock <key>`. This makes it a bit easier for someone
         tinkering around with TAPIR for the first time (like me) to know what
         to type.
      679fcb9f
  5. Jun 22, 2017
  6. Jun 08, 2017
  7. Feb 08, 2017
  8. Jan 18, 2017
  9. Jan 17, 2017
  10. Jan 04, 2017
  11. Aug 09, 2016
  12. May 13, 2016
  13. Feb 22, 2016
  14. Feb 11, 2016
  15. Feb 10, 2016
  16. Feb 08, 2016
  17. Feb 05, 2016
Loading