Work around deprecation of SoupServer's port property

See https://bugzilla.gnome.org/show_bug.cgi?id=732184
This commit is contained in:
Colin Walters 2014-09-09 09:30:02 -04:00
parent b18e19f9e4
commit 34c336c1f3
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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)
{