| 649 | } |
| 650 | |
| 651 | apr_array_header_t *h2_push_diary_update(h2_session *session, apr_array_header_t *pushes) |
| 652 | { |
| 653 | apr_array_header_t *npushes = pushes; |
| 654 | h2_push_diary_entry e; |
| 655 | int i, idx; |
| 656 | |
| 657 | if (session->push_diary && pushes) { |
| 658 | npushes = NULL; |
| 659 | |
| 660 | for (i = 0; i < pushes->nelts; ++i) { |
| 661 | h2_push *push; |
| 662 | |
| 663 | push = APR_ARRAY_IDX(pushes, i, h2_push*); |
| 664 | session->push_diary->dcalc(session->push_diary, &e.hash, push); |
| 665 | idx = h2_push_diary_find(session->push_diary, e.hash); |
| 666 | if (idx >= 0) { |
| 667 | /* Intentional no APLOGNO */ |
| 668 | ap_log_cerror(APLOG_MARK, GCSLOG_LEVEL, 0, session->c1, |
| 669 | "push_diary_update: already there PUSH %s", push->req->path); |
| 670 | move_to_last(session->push_diary, (apr_size_t)idx); |
| 671 | } |
| 672 | else { |
| 673 | /* Intentional no APLOGNO */ |
| 674 | ap_log_cerror(APLOG_MARK, GCSLOG_LEVEL, 0, session->c1, |
| 675 | "push_diary_update: adding PUSH %s", push->req->path); |
| 676 | if (!npushes) { |
| 677 | npushes = apr_array_make(pushes->pool, 5, sizeof(h2_push_diary_entry*)); |
| 678 | } |
| 679 | APR_ARRAY_PUSH(npushes, h2_push*) = push; |
| 680 | h2_push_diary_append(session->push_diary, &e); |
| 681 | } |
| 682 | } |
| 683 | } |
| 684 | return npushes; |
| 685 | } |
| 686 | |
| 687 | #if AP_HAS_RESPONSE_BUCKETS |
| 688 | apr_array_header_t *h2_push_collect_update(struct h2_stream *stream, |
no test coverage detected