MCPcopy Create free account
hub / github.com/apache/httpd / h2_iq_add

Function h2_iq_add

modules/http2/h2_util.c:354–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352
353
354int h2_iq_add(h2_iqueue *q, int sid, h2_iq_cmp *cmp, void *ctx)
355{
356 int i;
357
358 if (h2_iq_contains(q, sid)) {
359 return 0;
360 }
361 if (q->nelts >= q->nalloc) {
362 iq_grow(q, q->nalloc * 2);
363 }
364 i = (q->head + q->nelts) % q->nalloc;
365 q->elts[i] = sid;
366 ++q->nelts;
367
368 if (cmp) {
369 /* bubble it to the front of the queue */
370 iq_bubble_up(q, i, q->head, cmp, ctx);
371 }
372 return 1;
373}
374
375int h2_iq_append(h2_iqueue *q, int sid)
376{

Callers 2

c1_process_streamFunction · 0.85
h2_iq_appendFunction · 0.85

Calls 3

h2_iq_containsFunction · 0.85
iq_growFunction · 0.70
iq_bubble_upFunction · 0.70

Tested by

no test coverage detected