[ostree] Work around deprecation of SoupServer's port property
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Work around deprecation of SoupServer's port property
- Date: Tue, 9 Sep 2014 13:35:44 +0000 (UTC)
commit 34c336c1f3ad98918bb044533a43985413d05734
Author: Colin Walters <walters verbum org>
Date: Tue Sep 9 09:30:02 2014 -0400
Work around deprecation of SoupServer's port property
See https://bugzilla.gnome.org/show_bug.cgi?id=732184
Makefile.am | 2 +-
src/ostree/ot-builtin-trivial-httpd.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 614413c..34381ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
-DGPGVPATH=\"$(GPGVPATH)\" \
-DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' \
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36 \
- -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_40
+ -DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 -DSOUP_VERSION_MAX_ALLOWED=SOUP_VERSION_2_48
AM_CFLAGS += $(WARN_CFLAGS)
DISTCHECK_CONFIGURE_FLAGS += --enable-gtk-doc --disable-maintainer-mode
diff --git a/src/ostree/ot-builtin-trivial-httpd.c b/src/ostree/ot-builtin-trivial-httpd.c
index 4cfc4b4..727ff30 100644
--- a/src/ostree/ot-builtin-trivial-httpd.c
+++ b/src/ostree/ot-builtin-trivial-httpd.c
@@ -345,9 +345,15 @@ ostree_builtin_trivial_httpd (int argc, char **argv, OstreeRepo *repo, GCancella
app->root = g_file_new_for_path (dirpath);
+#if SOUP_CHECK_VERSION(2, 48, 0)
+ server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "ostree-httpd ", NULL);
+ soup_server_listen (server, NULL, 0);
+#else
server = soup_server_new (SOUP_SERVER_PORT, 0,
SOUP_SERVER_SERVER_HEADER, "ostree-httpd ",
NULL);
+#endif
+
soup_server_add_handler (server, NULL, httpd_callback, app, NULL);
if (opt_port_file)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]