mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
MINOR: h2: add function h2s_id() to report a stream's ID
This one supports being called with NULL and returns 0 in this case, making it easier to check for stream IDs in various send functions.
This commit is contained in:
parent
2e5b60ee18
commit
71681174f3
11
src/mux_h2.c
11
src/mux_h2.c
@ -351,6 +351,17 @@ static void h2_release(struct connection *conn)
|
||||
}
|
||||
|
||||
|
||||
/******************************************************/
|
||||
/* functions below are for the H2 protocol processing */
|
||||
/******************************************************/
|
||||
|
||||
/* returns the stream if of stream <h2s> or 0 if <h2s> is NULL */
|
||||
static inline int h2s_id(const struct h2s *h2s)
|
||||
{
|
||||
return h2s ? h2s->id : 0;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************/
|
||||
/* functions below are I/O callbacks from the connection */
|
||||
/*********************************************************/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user