aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlspicotls/tls_picotls.h
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2020-03-12 03:37:55 +0800
committerFlorin Coras <florin.coras@gmail.com>2020-03-13 15:21:09 +0000
commit88da0a3054609aaa58c48570dc6453414be7a034 (patch)
treebc295f927355f7769b7d6fda38e948ae960933e1 /src/plugins/tlspicotls/tls_picotls.h
parentdd9aedaf377f4af8620408843bd3e4610d3df5f9 (diff)
tls: small refactor for Picotls engine ctx_write function
Type: refactor Change-Id: I761fc764e6771dc95eb64614479c27fd44016690 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Diffstat (limited to 'src/plugins/tlspicotls/tls_picotls.h')
-rw-r--r--src/plugins/tlspicotls/tls_picotls.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/tlspicotls/tls_picotls.h b/src/plugins/tlspicotls/tls_picotls.h
index 1a253f0e45c..0fa19c538ad 100644
--- a/src/plugins/tlspicotls/tls_picotls.h
+++ b/src/plugins/tlspicotls/tls_picotls.h
@@ -13,7 +13,7 @@
#define TLS_RX_LEFT_LEN(x) ((x)->rx_len - (x)->rx_offset)
#define TLS_WRITE_OFFSET(x) ((x)->write_buffer.base + (x)->write_buffer_offset)
-#define TLS_WRITE_IS_LEFT(x) ((x)->write_buffer.off == (x)->write_buffer_offset)
+#define TLS_WRITE_IS_LEFT(x) ((x)->write_buffer.off != 0 && (x)->write_buffer.off != (x)->write_buffer_offset)
typedef struct tls_ctx_picotls_
@@ -27,7 +27,6 @@ typedef struct tls_ctx_picotls_
ptls_buffer_t write_buffer;
uint8_t *write_content;
int write_buffer_offset;
- int is_write_buffer_finished;
} picotls_ctx_t;
typedef struct tls_listen_ctx_picotls_