diff options
author | Florin Coras <fcoras@cisco.com> | 2022-02-11 11:59:04 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-02-11 19:55:17 +0000 |
commit | 360aee3e00c1211840b5a946a274ef1c496d5aa2 (patch) | |
tree | 42d8d7bedb5de3ce76f807fecf44ee742f16e731 /src/plugins/http/http_buffer.h | |
parent | d37328eb8b255135c9e0599650d994949e61cd27 (diff) |
http: fix support for files larger than u32
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iad7304c3a8fef14ec85c4240714feb86637411ca
Diffstat (limited to 'src/plugins/http/http_buffer.h')
-rw-r--r-- | src/plugins/http/http_buffer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/http/http_buffer.h b/src/plugins/http/http_buffer.h index 5c7569b9e3c..1140be42d6e 100644 --- a/src/plugins/http/http_buffer.h +++ b/src/plugins/http/http_buffer.h @@ -18,7 +18,7 @@ #include <svm/svm_fifo.h> -#define HTTP_BUFFER_DATA_SZ 24 +#define HTTP_BUFFER_DATA_SZ 32 typedef enum http_buffer_type_ { @@ -36,15 +36,15 @@ typedef struct http_buffer_ struct http_buffer_vft_ { - void (*init) (http_buffer_t *, void *data, u32 len); + void (*init) (http_buffer_t *, void *data, u64 len); void (*free) (http_buffer_t *); svm_fifo_seg_t *(*get_segs) (http_buffer_t *, u32 max_len, u32 *n_segs); - int (*drain) (http_buffer_t *, u32 len); + u32 (*drain) (http_buffer_t *, u32 len); u8 (*is_drained) (http_buffer_t *); }; void http_buffer_init (http_buffer_t *hb, http_buffer_type_t type, - svm_fifo_t *f, u32 data_len); + svm_fifo_t *f, u64 data_len); static inline void http_buffer_free (http_buffer_t *hb) @@ -59,7 +59,7 @@ http_buffer_get_segs (http_buffer_t *hb, u32 max_len, u32 *n_segs) return hb->vft->get_segs (hb, max_len, n_segs); } -static inline int +static inline u32 http_buffer_drain (http_buffer_t *hb, u32 len) { return hb->vft->drain (hb, len); |