Github user jpeach commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1294#discussion_r94530049
  
    --- Diff: iocore/net/BIO_fastopen.cc ---
    @@ -27,13 +27,26 @@
     
     #include "BIO_fastopen.h"
     
    +#if OPENSSL_VERSION_NUMBER < 0x10100000L
    +#define BIO_set_data(a, ptr) ((a)->ptr = (ptr))
    +#define BIO_get_data(a) ((a)->ptr)
    +#define BIO_set_init(a, init) ((a)->init = (init))
    +#define BIO_set_shutdown(a, shut) ((a)->shutdown = (shut))
    +#define BIO_get_shutdown(a) ((a)->shutdown)
    +#endif
    +
    +struct Data {
    +  Data() : fd(NO_FD), dst(nullptr) {}
    +  int fd;
    +  const sockaddr *dst;
    +};
    +
     static int
     fastopen_create(BIO *bio)
     {
    -  bio->init  = 0;
    -  bio->num   = NO_FD;
    -  bio->flags = 0;
    -  bio->ptr   = nullptr;
    +  Data *data = new Data;
    --- End diff --
    
    Right, the reinitialization in `fastopen_destroy` is just being defensive.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to