/* peer learn state */
enum peer_learn_state {
- PEER_LR_ST_NOTASSIGNED = 0,/* The peer is not assigned for a leason */
- PEER_LR_ST_ASSIGNED, /* The peer is assigned for a leason */
- PEER_LR_ST_PROCESSING, /* The peer has started the leason and it is not finished */
- PEER_LR_ST_FINISHED, /* The peer has finished the leason, this state must be ack by the sync task */
+ PEER_LR_ST_NOTASSIGNED = 0,/* The peer is not assigned for a lesson */
+ PEER_LR_ST_ASSIGNED, /* The peer is assigned for a lesson */
+ PEER_LR_ST_PROCESSING, /* The peer has started the lesson and it is not finished */
+ PEER_LR_ST_FINISHED, /* The peer has finished the lesson, this state must be ack by the sync task */
};
/******************************/
* negative error code is returned.
*
* Upon success, <msgf> is filled with a few H2_MSGF_* flags indicating what
- * was found while parsing. The caller must set it to zero in or H2_MSGF_BODY
+ * was found while parsing. The caller must set it to zero or to H2_MSGF_BODY
* if a body is detected (!ES).
*
* The headers list <list> must be composed of :
* negative error code is returned.
*
* Upon success, <msgf> is filled with a few H2_MSGF_* flags indicating what
- * was found while parsing. The caller must set it to zero in or H2_MSGF_BODY
+ * was found while parsing. The caller must set it to zero or to H2_MSGF_BODY
* if a body is detected (!ES).
*
* The headers list <list> must be composed of :
if (fields & (H2_PHDR_FND_AUTH|H2_PHDR_FND_METH|H2_PHDR_FND_PATH|H2_PHDR_FND_SCHM))
goto fail;
- /* Let's dump the request now if not yet emitted. */
+ /* Let's dump the response now if not yet emitted. */
if (!(fields & H2_PHDR_FND_NONE)) {
sl = h2_prepare_htx_stsline(fields, phdr_val, htx, msgf);
if (!sl)
uint rx_count; /* total number of allocated rxbufs */
/* 4 bytes hole here */
struct wait_event *subs; /* recv wait_event the stream connector associated is waiting on (via h2_subscribe) */
- struct list list; /* To be used when adding in h2c->send_list or h2c->fctl_lsit */
+ struct list list; /* To be used when adding in h2c->send_list or h2c->fctl_list */
struct tasklet *shut_tl; /* deferred shutdown tasklet, to retry to send an RST after we failed to,
* in case there's no other subscription to do it */
.flags = SE_FL_DETACHED,
};
-/* a dmumy closed stream */
+/* a dummy closed stream */
static const struct h2s *h2_closed_stream = &(const struct h2s){
.sd = (struct sedesc *)&closed_ep,
.h2c = NULL,
.id = 0,
};
-/* a dmumy closed stream returning a PROTOCOL_ERROR error */
+/* a dummy closed stream returning a PROTOCOL_ERROR error */
static const struct h2s *h2_error_stream = &(const struct h2s){
.sd = (struct sedesc *)&closed_ep,
.h2c = NULL,
.id = 0,
};
-/* a dmumy closed stream returning a REFUSED_STREAM error */
+/* a dummy closed stream returning a REFUSED_STREAM error */
static const struct h2s *h2_refused_stream = &(const struct h2s){
.sd = (struct sedesc *)&closed_ep,
.h2c = NULL,
break;
if (type == HTX_BLK_HDR) {
- BUG_ON(!sl); /* The start-line mut be defined before any headers */
+ BUG_ON(!sl); /* The start-line must be defined before any headers */
if (unlikely(hdr >= sizeof(list)/sizeof(list[0]) - 1)) {
TRACE_ERROR("too many headers", H2_EV_TX_FRAME|H2_EV_TX_HDR|H2_EV_H2S_ERR, h2c->conn, h2s);
goto fail;
}
}
- /* The start-line me be defined */
+ /* The start-line must be defined */
BUG_ON(!sl);
/* marker for end of headers */
break;
if (type == HTX_BLK_HDR) {
- BUG_ON(!sl); /* The start-line mut be defined before any headers */
+ BUG_ON(!sl); /* The start-line must be defined before any headers */
if (unlikely(hdr >= sizeof(list)/sizeof(list[0]) - 1)) {
TRACE_ERROR("too many headers", H2_EV_TX_FRAME|H2_EV_TX_HDR|H2_EV_H2S_ERR, h2c->conn, h2s);
goto fail;
}
}
- /* The start-line me be defined */
+ /* The start-line must be defined */
BUG_ON(!sl);
/* Now add the server name to a header (if requested) */
if (fsize > h2c->mws)
fsize = h2c->mws;
- /* now let's copy this this into the output buffer */
+ /* now let's copy this into the output buffer */
memcpy(outbuf.area + 9, htx_get_blk_ptr(htx, blk), fsize);
h2s->sws -= fsize;
h2c->mws -= fsize;
/* if local peer has accepted the connection (appctx is
* on the backend side), flag it to learn a lesson and
* be sure it will start immediately. This only happens
- * if no resync is in progress and if the lacal resync
+ * if no resync is in progress and if the local resync
* was not already performed.
*/
if ((peers->flags & PEERS_RESYNC_STATEMASK) == PEERS_RESYNC_FROMLOCAL &&
return ret;
}
-/* get length of the initial segment consisting entirely of bytes not in <rejcet> */
+/* get length of the initial segment consisting entirely of bytes not in <reject> */
size_t my_memcspn(const void *str, size_t len, const void *reject, size_t rejectlen)
{
size_t ret = 0;
t = (m >> (s - 1)) & 0x1;
s -= ((t - r) & 256) >> 8;
- return s - 1;
+ return s - 1;
}
/* Same as mask_find_rank_bit() above but makes use of pre-computed bitmaps
int port;
index_hash++;
- if (index_hash == NB_L_HASH_WORD) {
- index_hash = 0;
- }
+ if (index_hash == NB_L_HASH_WORD)
+ index_hash = 0;
if (scramble == 0) {
return ipstring;
/* Initialize array <fp> with the fingerprint of word <word> by counting the
* transitions between characters. <fp> is a 1024-entries array indexed as
* 32*from+to. Positions for 'from' and 'to' are:
- * 0..25=letter, 26=digit, 27=other, 28=begin, 29=end, others unused.
+ * 1..26=letter, 27=digit, 28=other/begin/end.
*/
void make_word_fingerprint(uint8_t *fp, const char *word)
{
/* Initialize array <fp> with the fingerprint of word <word> by counting the
* transitions between characters. <fp> is a 1024-entries array indexed as
* 32*from+to. Positions for 'from' and 'to' are:
- * 0..25=letter, 26=digit, 27=other, 28=begin, 29=end, others unused.
+ * 1..26=letter, 27=digit, 28=other/begin/end.
*/
void make_word_fingerprint_with_len(uint8_t *fp, struct ist word)
{