Hello community,
here is the log from the commit of package nghttp2 for openSUSE:Factory checked in at 2015-07-02 22:49:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nghttp2 (Old)
and /work/SRC/openSUSE:Factory/.nghttp2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nghttp2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/nghttp2/nghttp2.changes 2015-06-24 21:06:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nghttp2.new/nghttp2.changes 2015-07-03 00:10:44.000000000 +0200
@@ -1,0 +2,11 @@
+Tue Jun 30 11:54:06 UTC 2015 - mpluskal@suse.com
+
+- Update to 1.0.5
+ * Add STREAM_DEP_DEBUG macro switch to enable runtime validation
+ of depedency tree
+ * Fix another bug in priority handling; sibling's item is not
+ queued when ancestor's item is detached
+ * nghttpx: Fix crash with --http2-bridge and both frontend and
+ backend TLS
+
+-------------------------------------------------------------------
Old:
----
nghttp2-1.0.4.tar.xz
New:
----
nghttp2-1.0.5.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nghttp2.spec ++++++
--- /var/tmp/diff_new_pack.QZyVgE/_old 2015-07-03 00:10:45.000000000 +0200
+++ /var/tmp/diff_new_pack.QZyVgE/_new 2015-07-03 00:10:45.000000000 +0200
@@ -19,7 +19,7 @@
%define lib_name lib%{name}-14
%define lib_name_asio lib%{name}_asio1
Name: nghttp2
-Version: 1.0.4
+Version: 1.0.5
Release: 0
Summary: Implementation of Hypertext Transfer Protocol version 2 in C
License: MIT
++++++ nghttp2-1.0.4.tar.xz -> nghttp2-1.0.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/ChangeLog new/nghttp2-1.0.5/ChangeLog
--- old/nghttp2-1.0.4/ChangeLog 2015-06-23 16:24:41.000000000 +0200
+++ new/nghttp2-1.0.5/ChangeLog 2015-06-27 04:00:23.000000000 +0200
@@ -1,34 +1,91 @@
-commit 5a8d5e5dd91eff3730c72a9f15fbc4f36a71c3fc (HEAD, tag: v1.0.4, origin/master, origin/HEAD, master)
+commit 68f6df61e53137eed8e7c68ae937adbb9a969dc9 (HEAD, tag: v1.0.5, origin/master, origin/HEAD, master)
Author: Tatsuhiro Tsujikawa
-AuthorDate: 2015-06-23
+AuthorDate: 2015-06-27
Commit: Tatsuhiro Tsujikawa
-CommitDate: 2015-06-23
+CommitDate: 2015-06-27
Update man pages
-commit 9bcb0ffdef08537d327b961293098858d501cbb6
+commit 078337de3c210bbc374b8443b0651199bfe64877
Author: Tatsuhiro Tsujikawa
-AuthorDate: 2015-06-23
+AuthorDate: 2015-06-27
Commit: Tatsuhiro Tsujikawa
-CommitDate: 2015-06-23
+CommitDate: 2015-06-27
- Bump up version number to 1.0.4, LT revision to 14:4:0
+ Bump up version number to 1.0.5, LT revision to 14:5:0
-commit 1945d0f02ab3bda84411f1741ec4a54f507c8c6f
+commit 9e82687cbe988390a5695cd3fd5ef50f5243251b
Author: Tatsuhiro Tsujikawa
-AuthorDate: 2015-06-23
+AuthorDate: 2015-06-26
Commit: Tatsuhiro Tsujikawa
-CommitDate: 2015-06-23
+CommitDate: 2015-06-26
+
+ Fix compile error with --enable-werror
+
+commit 660f90e13f91804e3d771c038cfe62fd5cf0b580
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-26
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-26
+
+ Add switch STREAM_DEP_DEBUG to enable runtime validation of depedency tree
+
+commit 2eec42df3953d3256c9f4bfe3357efe0e4fb06f3
+Merge: bab99af 34b92a3
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-26
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-26
+
+ Merge branch 'master' of https://github.com/tatsuhiro-t/nghttp2
+
+commit 34b92a30de8a09af27e903d1976d5ea561c99ec2
+Merge: d6ca95a 2e8e38e
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-26
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-26
- Fix assertion failure in nghttp2_stream.c
+ Merge pull request #268 from Andersbakken/typo
- This is regression introduced in
- 46b70c1db8534a2d3ee8dc93eb6343633a0180b3.
+ Fix typo
+
+commit bab99af565ac7c89e10fa9d8d7b3b6e11708ec7a
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-25
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-25
+
+ Fix unusual control flow in stream_update_dep_set_rest
+
+commit 2e8e38ec3512d92b0fbf1ad565529001bf237855
+Author: Anders Bakken
+AuthorDate: 2015-06-24
+Commit: Anders Bakken
+CommitDate: 2015-06-24
+
+ Fix typo
+
+commit d6ca95a0c9f790a45ea682eccafdb12d8d19976e
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-24
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-24
+
+ Fix sibling's item is not queued when ancestor's item is detached
+
+commit 285c74c39418537bc5b3f949be301cdb1f9e39f0
+Author: Tatsuhiro Tsujikawa
+AuthorDate: 2015-06-24
+Commit: Tatsuhiro Tsujikawa
+CommitDate: 2015-06-24
+
+ nghttpx: Fix crash with --http2-bridge and both frontend and backend TLS
-commit 4870edb33d770332b1f30b5c8e63293711defedd
+commit 7780c0783835ad33e22e2b9b33d59d9a71eb5bda
Author: Tatsuhiro Tsujikawa
AuthorDate: 2015-06-23
Commit: Tatsuhiro Tsujikawa
CommitDate: 2015-06-23
- Bump up version number to 1.0.4-DEV
+ Bump up version number to 1.0.5-DEV
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/configure new/nghttp2-1.0.5/configure
--- old/nghttp2-1.0.4/configure 2015-06-23 16:24:23.000000000 +0200
+++ new/nghttp2-1.0.5/configure 2015-06-27 04:00:09.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for nghttp2 1.0.4.
+# Generated by GNU Autoconf 2.69 for nghttp2 1.0.5.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='nghttp2'
PACKAGE_TARNAME='nghttp2'
-PACKAGE_VERSION='1.0.4'
-PACKAGE_STRING='nghttp2 1.0.4'
+PACKAGE_VERSION='1.0.5'
+PACKAGE_STRING='nghttp2 1.0.5'
PACKAGE_BUGREPORT='t-tujikawa@users.sourceforge.net'
PACKAGE_URL=''
@@ -1438,7 +1438,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures nghttp2 1.0.4 to adapt to many kinds of systems.
+\`configure' configures nghttp2 1.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1509,7 +1509,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of nghttp2 1.0.4:";;
+ short | recursive ) echo "Configuration of nghttp2 1.0.5:";;
esac
cat <<\_ACEOF
@@ -1690,7 +1690,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-nghttp2 configure 1.0.4
+nghttp2 configure 1.0.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2650,7 +2650,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by nghttp2 $as_me 1.0.4, which was
+It was created by nghttp2 $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -12127,7 +12127,7 @@
# Define the identity of the package.
PACKAGE='nghttp2'
- VERSION='1.0.4'
+ VERSION='1.0.5'
cat >>confdefs.h <<_ACEOF
@@ -12398,7 +12398,7 @@
LT_CURRENT=14
-LT_REVISION=4
+LT_REVISION=5
LT_AGE=0
@@ -23147,7 +23147,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by nghttp2 $as_me 1.0.4, which was
+This file was extended by nghttp2 $as_me 1.0.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23213,7 +23213,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-nghttp2 config.status 1.0.4
+nghttp2 config.status 1.0.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/configure.ac new/nghttp2-1.0.5/configure.ac
--- old/nghttp2-1.0.4/configure.ac 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/configure.ac 2015-06-27 03:59:57.000000000 +0200
@@ -25,7 +25,7 @@
dnl http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Orderin...
AC_PREREQ(2.61)
-AC_INIT([nghttp2], [1.0.4], [t-tujikawa@users.sourceforge.net])
+AC_INIT([nghttp2], [1.0.5], [t-tujikawa@users.sourceforge.net])
AC_USE_SYSTEM_EXTENSIONS
LT_PREREQ([2.2.6])
@@ -48,7 +48,7 @@
dnl See versioning rule:
dnl http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.h...
AC_SUBST(LT_CURRENT, 14)
-AC_SUBST(LT_REVISION, 4)
+AC_SUBST(LT_REVISION, 5)
AC_SUBST(LT_AGE, 0)
major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/doc/h2load.1 new/nghttp2-1.0.5/doc/h2load.1
--- old/nghttp2-1.0.4/doc/h2load.1 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/doc/h2load.1 2015-06-27 03:59:57.000000000 +0200
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "H2LOAD" "1" "June 23, 2015" "1.0.4" "nghttp2"
+.TH "H2LOAD" "1" "June 27, 2015" "1.0.5" "nghttp2"
.SH NAME
h2load \- HTTP/2 benchmarking tool
.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/doc/nghttp.1 new/nghttp2-1.0.5/doc/nghttp.1
--- old/nghttp2-1.0.4/doc/nghttp.1 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/doc/nghttp.1 2015-06-27 03:59:57.000000000 +0200
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "NGHTTP" "1" "June 23, 2015" "1.0.4" "nghttp2"
+.TH "NGHTTP" "1" "June 27, 2015" "1.0.5" "nghttp2"
.SH NAME
nghttp \- HTTP/2 experimental client
.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/doc/nghttpd.1 new/nghttp2-1.0.5/doc/nghttpd.1
--- old/nghttp2-1.0.4/doc/nghttpd.1 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/doc/nghttpd.1 2015-06-27 03:59:57.000000000 +0200
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "NGHTTPD" "1" "June 23, 2015" "1.0.4" "nghttp2"
+.TH "NGHTTPD" "1" "June 27, 2015" "1.0.5" "nghttp2"
.SH NAME
nghttpd \- HTTP/2 experimental server
.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/doc/nghttpx.1 new/nghttp2-1.0.5/doc/nghttpx.1
--- old/nghttp2-1.0.4/doc/nghttpx.1 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/doc/nghttpx.1 2015-06-27 03:59:57.000000000 +0200
@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
-.TH "NGHTTPX" "1" "June 23, 2015" "1.0.4" "nghttp2"
+.TH "NGHTTPX" "1" "June 27, 2015" "1.0.5" "nghttp2"
.SH NAME
nghttpx \- HTTP/2 experimental proxy
.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/lib/includes/nghttp2/nghttp2ver.h new/nghttp2-1.0.5/lib/includes/nghttp2/nghttp2ver.h
--- old/nghttp2-1.0.4/lib/includes/nghttp2/nghttp2ver.h 2015-06-23 16:24:53.000000000 +0200
+++ new/nghttp2-1.0.5/lib/includes/nghttp2/nghttp2ver.h 2015-06-27 04:00:32.000000000 +0200
@@ -29,7 +29,7 @@
* @macro
* Version number of the nghttp2 library release
*/
-#define NGHTTP2_VERSION "1.0.4"
+#define NGHTTP2_VERSION "1.0.5"
/**
* @macro
@@ -37,6 +37,6 @@
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define NGHTTP2_VERSION_NUM 0x010004
+#define NGHTTP2_VERSION_NUM 0x010005
#endif /* NGHTTP2VER_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/lib/nghttp2_helper.c new/nghttp2-1.0.5/lib/nghttp2_helper.c
--- old/nghttp2-1.0.4/lib/nghttp2_helper.c 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/lib/nghttp2_helper.c 2015-06-27 03:59:57.000000000 +0200
@@ -308,7 +308,7 @@
case NGHTTP2_ERR_CALLBACK_FAILURE:
return "The user callback function failed";
case NGHTTP2_ERR_BAD_CLIENT_MAGIC:
- return "Received bad clinet magic byte string";
+ return "Received bad client magic byte string";
default:
return "Unknown error code";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/lib/nghttp2_stream.c new/nghttp2-1.0.5/lib/nghttp2_stream.c
--- old/nghttp2-1.0.4/lib/nghttp2_stream.c 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/lib/nghttp2_stream.c 2015-06-27 03:59:57.000000000 +0200
@@ -155,6 +155,8 @@
}
static void stream_update_dep_set_rest(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+
if (stream == NULL) {
return;
}
@@ -167,14 +169,12 @@
if (stream->dpri == NGHTTP2_STREAM_DPRI_TOP) {
stream->dpri = NGHTTP2_STREAM_DPRI_REST;
-
- stream_update_dep_set_rest(stream->sib_next);
-
return;
}
- stream_update_dep_set_rest(stream->sib_next);
- stream_update_dep_set_rest(stream->dep_next);
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ stream_update_dep_set_rest(si);
+ }
}
/*
@@ -315,9 +315,146 @@
return NULL;
}
+#ifdef STREAM_DEP_DEBUG
+
+static size_t check_stream_num(nghttp2_stream *stream) {
+ size_t n = 1;
+ nghttp2_stream *si;
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ n += check_stream_num(si);
+ }
+ if (n != stream->num_substreams) {
+ fprintf(stderr, "num_substreams = %zu; want %zu\n", n,
+ stream->num_substreams);
+
+ assert(0);
+ }
+ return n;
+}
+
+static void ensure_rest_or_no_item(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+ switch (stream->dpri) {
+ case NGHTTP2_STREAM_DPRI_TOP:
+ fprintf(stderr, "NGHTTP2_STREAM_DPRI_TOP; want REST or NO_ITEM\n");
+ assert(0);
+ break;
+ case NGHTTP2_STREAM_DPRI_REST:
+ case NGHTTP2_STREAM_DPRI_NO_ITEM:
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ ensure_rest_or_no_item(si);
+ }
+ break;
+ default:
+ fprintf(stderr, "invalid dpri %d\n", stream->dpri);
+ assert(0);
+ }
+}
+
+static void check_dpri(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+ switch (stream->dpri) {
+ case NGHTTP2_STREAM_DPRI_TOP:
+ if (!stream->item->queued) {
+ fprintf(stderr, "stream->item->queued is not nonzero while it is in "
+ "NGHTTP2_STREAM_DPRI_TOP\n");
+ assert(0);
+ }
+ /* fall through */
+ case NGHTTP2_STREAM_DPRI_REST:
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ ensure_rest_or_no_item(si);
+ }
+ break;
+ case NGHTTP2_STREAM_DPRI_NO_ITEM:
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ check_dpri(si);
+ }
+ break;
+ default:
+ fprintf(stderr, "invalid dpri %d\n", stream->dpri);
+ assert(0);
+ }
+}
+
+static void check_sum_dep(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+ int32_t n = 0;
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ n += si->weight;
+ }
+ if (n != stream->sum_dep_weight) {
+ fprintf(stderr, "sum_dep_weight = %d; want %d\n", n,
+ stream->sum_dep_weight);
+ assert(0);
+ }
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ check_sum_dep(si);
+ }
+}
+
+static int check_sum_norest(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+ int32_t n = 0;
+ switch (stream->dpri) {
+ case NGHTTP2_STREAM_DPRI_TOP:
+ return 1;
+ case NGHTTP2_STREAM_DPRI_REST:
+ return 0;
+ case NGHTTP2_STREAM_DPRI_NO_ITEM:
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ if (check_sum_norest(si)) {
+ n += si->weight;
+ }
+ }
+ break;
+ default:
+ fprintf(stderr, "invalid dpri %d\n", stream->dpri);
+ assert(0);
+ }
+ if (n != stream->sum_norest_weight) {
+ fprintf(stderr, "sum_norest_weight = %d; want %d\n", n,
+ stream->sum_norest_weight);
+ assert(0);
+ }
+ return n > 0;
+}
+
+static void check_dep_prev(nghttp2_stream *stream) {
+ nghttp2_stream *si;
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ if (si->dep_prev != stream) {
+ fprintf(stderr, "si->dep_prev = %p; want %p\n", si->dep_prev, stream);
+ assert(0);
+ }
+ check_dep_prev(si);
+ }
+}
+
+#endif /* STREAM_DEP_DEBUG */
+
+#ifdef STREAM_DEP_DEBUG
+static void validate_tree(nghttp2_stream *stream) {
+ if (!stream) {
+ return;
+ }
+
+ for (; stream->dep_prev; stream = stream->dep_prev)
+ ;
+
+ check_stream_num(stream);
+ check_dpri(stream);
+ check_sum_dep(stream);
+ check_sum_norest(stream);
+ check_dep_prev(stream);
+}
+#else /* !STREAM_DEP_DEBUG */
+static void validate_tree(nghttp2_stream *stream _U_) {}
+#endif /* !STREAM_DEP_DEBUG*/
+
static int stream_update_dep_on_attach_item(nghttp2_stream *stream,
nghttp2_session *session) {
- nghttp2_stream *blocking_stream;
+ nghttp2_stream *blocking_stream, *si;
int rv;
stream->dpri = NGHTTP2_STREAM_DPRI_REST;
@@ -327,6 +464,7 @@
/* If we found REST or TOP in ascendants, we don't have to update
any metadata. */
if (blocking_stream) {
+ validate_tree(stream);
return 0;
}
@@ -334,7 +472,9 @@
if (stream->sum_norest_weight == 0) {
stream_update_dep_sum_norest_weight(stream->dep_prev, stream->weight);
} else {
- stream_update_dep_set_rest(stream->dep_next);
+ for (si = stream->dep_next; si; si = si->sib_next) {
+ stream_update_dep_set_rest(si);
+ }
}
if (!stream->item->queued) {
@@ -346,13 +486,17 @@
}
}
+ validate_tree(stream);
return 0;
}
static int stream_update_dep_on_detach_item(nghttp2_stream *stream,
nghttp2_session *session) {
+ int rv;
+
if (stream->dpri == NGHTTP2_STREAM_DPRI_REST) {
stream->dpri = NGHTTP2_STREAM_DPRI_NO_ITEM;
+ validate_tree(stream);
return 0;
}
@@ -360,6 +504,7 @@
/* nghttp2_stream_defer_item() does not clear stream->item, but
set dpri = NGHTTP2_STREAM_DPRI_NO_ITEM. Catch this case
here. */
+ validate_tree(stream);
return 0;
}
@@ -367,10 +512,18 @@
if (stream_update_dep_set_top(stream) == 0) {
stream_update_dep_sum_norest_weight(stream->dep_prev, -stream->weight);
+ validate_tree(stream);
return 0;
}
- return stream_update_dep_queue_top(stream->dep_next, session);
+ rv = stream_update_dep_queue_top(stream, session);
+ if (rv != 0) {
+ return rv;
+ }
+
+ validate_tree(stream);
+
+ return 0;
}
int nghttp2_stream_attach_item(nghttp2_stream *stream,
@@ -550,6 +703,8 @@
stream_update_dep_length(dep_stream, 1);
++stream->roots->num_streams;
+
+ validate_tree(stream);
}
static void set_dep_prev(nghttp2_stream *stream, nghttp2_stream *dep) {
@@ -679,6 +834,8 @@
}
++stream->roots->num_streams;
+
+ validate_tree(stream);
}
void nghttp2_stream_dep_remove(nghttp2_stream *stream) {
@@ -726,8 +883,10 @@
if (stream->sib_prev) {
unlink_sib(stream);
+ validate_tree(stream->sib_prev->dep_prev);
} else if (stream->dep_prev) {
unlink_dep(stream);
+ validate_tree(stream->dep_prev);
} else {
nghttp2_stream_roots_remove(stream->roots, stream);
@@ -743,6 +902,8 @@
nghttp2_stream_roots_add(si->roots, si);
+ validate_tree(si);
+
si = next;
}
}
@@ -767,6 +928,7 @@
nghttp2_stream *blocking_stream;
nghttp2_stream *si;
size_t delta_substreams;
+ int rv;
DEBUGF(fprintf(stderr, "stream: dep_insert_subtree dep_stream(%p)=%d "
"stream(%p)=%d\n",
@@ -776,6 +938,10 @@
blocking_stream = stream_get_dep_blocking(dep_stream);
+ if (blocking_stream) {
+ stream_update_dep_set_rest(stream);
+ }
+
if (dep_stream->dep_next) {
/* dep_stream->num_substreams includes dep_stream itself */
stream->num_substreams += dep_stream->num_substreams - 1;
@@ -786,7 +952,9 @@
dep_next = dep_stream->dep_next;
if (!blocking_stream && dep_stream->sum_norest_weight) {
- stream_update_dep_set_rest(dep_next);
+ for (si = dep_next; si; si = si->sib_next) {
+ stream_update_dep_set_rest(si);
+ }
}
link_dep(dep_stream, stream);
@@ -812,25 +980,33 @@
stream_update_dep_length(dep_stream, delta_substreams);
if (blocking_stream) {
- stream_update_dep_set_rest(stream);
-
+ validate_tree(dep_stream);
return 0;
}
if (stream_update_dep_set_top(stream) == 0) {
+ validate_tree(dep_stream);
return 0;
}
dep_stream->sum_norest_weight = stream->weight;
stream_update_dep_sum_norest_weight(dep_stream->dep_prev, dep_stream->weight);
- return stream_update_dep_queue_top(stream, session);
+ rv = stream_update_dep_queue_top(stream, session);
+ if (rv != 0) {
+ return rv;
+ }
+
+ validate_tree(dep_stream);
+
+ return 0;
}
int nghttp2_stream_dep_add_subtree(nghttp2_stream *dep_stream,
nghttp2_stream *stream,
nghttp2_session *session) {
nghttp2_stream *blocking_stream;
+ int rv;
DEBUGF(fprintf(stderr, "stream: dep_add_subtree dep_stream(%p)=%d "
"stream(%p)=%d\n",
@@ -856,15 +1032,18 @@
NGHTTP2_DPRI_TOP. Just dfs under stream here. */
stream_update_dep_set_rest(stream);
+ validate_tree(dep_stream);
return 0;
}
if (stream->dpri == NGHTTP2_STREAM_DPRI_TOP) {
stream_update_dep_sum_norest_weight(dep_stream, stream->weight);
+ validate_tree(dep_stream);
return 0;
}
if (stream_update_dep_set_top(stream) == 0) {
+ validate_tree(dep_stream);
return 0;
}
@@ -872,7 +1051,14 @@
sum_norest_weight */
stream_update_dep_sum_norest_weight(dep_stream, stream->weight);
- return stream_update_dep_queue_top(stream, session);
+ rv = stream_update_dep_queue_top(stream, session);
+ if (rv != 0) {
+ return rv;
+ }
+
+ validate_tree(dep_stream);
+
+ return 0;
}
void nghttp2_stream_dep_remove_subtree(nghttp2_stream *stream) {
@@ -911,6 +1097,8 @@
stream->sum_norest_weight))) {
stream_update_dep_sum_norest_weight(dep_prev, -stream->weight);
}
+
+ validate_tree(dep_prev);
}
stream->sib_prev = NULL;
@@ -920,16 +1108,26 @@
int nghttp2_stream_dep_make_root(nghttp2_stream *stream,
nghttp2_session *session) {
+ int rv;
+
DEBUGF(fprintf(stderr, "stream: dep_make_root stream(%p)=%d\n", stream,
stream->stream_id));
nghttp2_stream_roots_add(stream->roots, stream);
if (stream_update_dep_set_top(stream) == 0) {
+ validate_tree(stream);
return 0;
}
- return stream_update_dep_queue_top(stream, session);
+ rv = stream_update_dep_queue_top(stream, session);
+ if (rv != 0) {
+ return rv;
+ }
+
+ validate_tree(stream);
+
+ return 0;
}
int
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/python/Makefile.in new/nghttp2-1.0.5/python/Makefile.in
--- old/nghttp2-1.0.4/python/Makefile.in 2015-06-23 16:24:25.000000000 +0200
+++ new/nghttp2-1.0.5/python/Makefile.in 2015-06-27 04:00:10.000000000 +0200
@@ -431,9 +431,9 @@
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@ENABLE_PYTHON_BINDINGS_FALSE@install-exec-local:
@ENABLE_PYTHON_BINDINGS_FALSE@uninstall-local:
@ENABLE_PYTHON_BINDINGS_FALSE@clean-local:
-@ENABLE_PYTHON_BINDINGS_FALSE@install-exec-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/src/shrpx_connection_handler.cc new/nghttp2-1.0.5/src/shrpx_connection_handler.cc
--- old/nghttp2-1.0.4/src/shrpx_connection_handler.cc 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/src/shrpx_connection_handler.cc 2015-06-27 03:59:57.000000000 +0200
@@ -543,6 +543,14 @@
auto ssl_ctx = all_ssl_ctx_[ocsp_.next];
auto tls_ctx_data =
static_cast(SSL_CTX_get_app_data(ssl_ctx));
+
+ // client SSL_CTX is also included in all_ssl_ctx_, but has no
+ // tls_ctx_data.
+ if (!tls_ctx_data) {
+ ++ocsp_.next;
+ continue;
+ }
+
auto cert_file = tls_ctx_data->cert_file;
if (start_ocsp_update(cert_file) != 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nghttp2-1.0.4/tests/nghttp2_session_test.c new/nghttp2-1.0.5/tests/nghttp2_session_test.c
--- old/nghttp2-1.0.4/tests/nghttp2_session_test.c 2015-06-23 16:24:06.000000000 +0200
+++ new/nghttp2-1.0.5/tests/nghttp2_session_test.c 2015-06-27 03:59:57.000000000 +0200
@@ -6429,6 +6429,46 @@
CU_ASSERT(0 == b->sum_norest_weight);
nghttp2_session_del(session);
+
+ nghttp2_session_server_new(&session, &callbacks, NULL);
+
+ a = open_stream(session, 1);
+ b = open_stream_with_dep(session, 3, a);
+ c = open_stream_with_dep(session, 5, a);
+ d = open_stream_with_dep(session, 7, c);
+
+ /* a
+ * |
+ * c--b
+ * |
+ * d
+ */
+
+ da = create_data_ob_item(mem);
+ db = create_data_ob_item(mem);
+ dc = create_data_ob_item(mem);
+
+ nghttp2_stream_attach_item(a, da, session);
+ nghttp2_stream_attach_item(b, db, session);
+ nghttp2_stream_attach_item(c, dc, session);
+
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_TOP == a->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_REST == b->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_REST == c->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_NO_ITEM == d->dpri);
+
+ /* check that all children's item get queued */
+ nghttp2_stream_detach_item(a, session);
+
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_NO_ITEM == a->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_TOP == b->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_TOP == c->dpri);
+ CU_ASSERT(NGHTTP2_STREAM_DPRI_NO_ITEM == d->dpri);
+
+ CU_ASSERT(1 == db->queued);
+ CU_ASSERT(1 == dc->queued);
+
+ nghttp2_session_del(session);
}
void test_nghttp2_session_stream_attach_item_subtree(void) {