mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-26 14:42:21 +00:00
MINOR: ring: add ring_data() to report the amount of data in a ring
This will be used as an accessor for the few functions that need this outside of ring.c.
This commit is contained in:
parent
ee1c92cf10
commit
4c41fcd0da
@ -45,6 +45,12 @@ size_t ring_max_payload(const struct ring *ring);
|
||||
int ring_dispatch_messages(struct ring *ring, void *ctx, size_t *ofs_ptr, size_t *last_ofs_ptr, uint flags,
|
||||
ssize_t (*msg_handler)(void *ctx, const struct buffer *buf, size_t ofs, size_t len));
|
||||
|
||||
/* returns the number of bytes in the ring */
|
||||
static inline size_t ring_data(const struct ring *ring)
|
||||
{
|
||||
return b_data(&ring->buf);
|
||||
}
|
||||
|
||||
#endif /* _HAPROXY_RING_H */
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user