summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-10-20 15:07:14 +0000
committerDan Winship <danw@src.gnome.org>2008-10-20 15:07:14 +0000
commit248196792a4b75f6941f347dac69df6851919155 (patch)
tree416502703b96bfec0ce6bc0e38ed6920358c79f1
parentd8df89a421b7a64c303a2decd6176a14cf6840e3 (diff)
downloadlibsoup-248196792a4b75f6941f347dac69df6851919155.tar.gz
pull-ups from trunk
svn path=/branches/gnome-2-24/; revision=1185
-rw-r--r--ChangeLog32
-rw-r--r--configure.in6
-rw-r--r--libsoup/Makefile.am1
-rw-r--r--libsoup/soup-auth.c2
-rw-r--r--libsoup/soup-status.h2
-rw-r--r--libsoup/soup-types.h2
-rw-r--r--libsoup/soup-uri.c4
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/dns.c2
-rw-r--r--tests/getbug.c4
-rw-r--r--tests/server-auth-test.c2
11 files changed, 50 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index b818e18c..097d38b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,35 @@
+2008-10-20 Dan Winship <danw@gnome.org>
+
+ * tests/Makefile.am (INCLUDES): add SOUP_MAINTAINER_FLAGS here
+ too.
+
+ * tests/dns.c (main):
+ * tests/getbug.c (main):
+ * tests/server-auth-test.c (do_test): replace deprecated glib
+ functions
+
+2008-10-20 Cosimo Cecchi <cosimoc@gnome.org>
+
+ * configure.in:
+ * libsoup/Makefile.am:
+ * libsoup/soup-status.h:
+ * libsoup/soup-types.h:
+ * libsoup/soup-uri.c: (soup_uri_to_string):
+ Build with G_DISABLE_DEPRECATED and G_DISABLE_SINGLE_INCLUDES; enforce
+ the first switch under maintainer mode and the second one
+ unconditionally (#557072).
+
+2008-10-19 Dan Winship <danw@gnome.org>
+
+ * libsoup/soup-auth.c (soup_auth_update): compare scheme name
+ case-insensitively, to prevent an infinite loop when it's not in
+ standard form. #536285
+
+2008-10-09 Andrew W. Nosenko <andrew.w.nosenko@gmail.com>
+
+ * libsoup/soup-uri.c (soup_uri_to_string): Verify whether uri is
+ non-NULL and avoid crash on NULL pointer dereference therefore.
+
2008-10-01 Dan Winship <danw@gnome.org>
* tests/xmlrpc-test.c (main): add a new -s flag to indicate that
diff --git a/configure.in b/configure.in
index bd0473f4..0e8bd36c 100644
--- a/configure.in
+++ b/configure.in
@@ -50,6 +50,11 @@ fi
AC_SUBST(SOUP_DEBUG_FLAGS)
+# Set the maintainer flags
+if test "x$enable_maintainer_mode" = "xyes"; then
+ SOUP_MAINTAINER_FLAGS="-DG_DISABLE_DEPRECATED"
+ AC_SUBST(SOUP_MAINTAINER_FLAGS)
+fi
dnl ***************************
dnl *** Checks for programs ***
@@ -77,6 +82,7 @@ AM_PATH_GLIB_2_0(2.15.3,,,gobject gthread gio)
if test "$GLIB_LIBS" = ""; then
AC_MSG_ERROR(GLIB 2.15.3 or later is required to build libsoup)
fi
+GLIB_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_SINGLE_INCLUDES"
PKG_CHECK_MODULES(XML, libxml-2.0)
AC_SUBST(XML_CFLAGS)
diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am
index 97f3bf6c..c7094efb 100644
--- a/libsoup/Makefile.am
+++ b/libsoup/Makefile.am
@@ -8,6 +8,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libsoup\" \
-I$(top_srcdir) \
$(SOUP_DEBUG_FLAGS) \
+ $(SOUP_MAINTAINER_FLAGS) \
$(GLIB_CFLAGS) \
$(XML_CFLAGS) \
$(LIBGCRYPT_CFLAGS) \
diff --git a/libsoup/soup-auth.c b/libsoup/soup-auth.c
index dc855ccd..221438f7 100644
--- a/libsoup/soup-auth.c
+++ b/libsoup/soup-auth.c
@@ -266,7 +266,7 @@ soup_auth_update (SoupAuth *auth, SoupMessage *msg, const char *auth_header)
g_return_val_if_fail (auth_header != NULL, FALSE);
scheme = soup_auth_get_scheme_name (auth);
- if (strncmp (auth_header, scheme, strlen (scheme)) != 0)
+ if (g_ascii_strncasecmp (auth_header, scheme, strlen (scheme)) != 0)
return FALSE;
params = soup_header_parse_param_list (auth_header + strlen (scheme));
diff --git a/libsoup/soup-status.h b/libsoup/soup-status.h
index 983250b3..c8cacb45 100644
--- a/libsoup/soup-status.h
+++ b/libsoup/soup-status.h
@@ -8,7 +8,7 @@
#ifndef SOUP_STATUS_H
#define SOUP_STATUS_H 1
-#include <glib/gmacros.h>
+#include <glib.h>
G_BEGIN_DECLS
diff --git a/libsoup/soup-types.h b/libsoup/soup-types.h
index 5f44e37c..8b485bf0 100644
--- a/libsoup/soup-types.h
+++ b/libsoup/soup-types.h
@@ -6,7 +6,7 @@
#ifndef SOUP_TYPES_H
#define SOUP_TYPES_H 1
-#include <glib/gtypes.h>
+#include <glib.h>
#include <glib-object.h>
#include <libsoup/soup-status.h>
diff --git a/libsoup/soup-uri.c b/libsoup/soup-uri.c
index 4ecf9318..ceca3abe 100644
--- a/libsoup/soup-uri.c
+++ b/libsoup/soup-uri.c
@@ -415,6 +415,8 @@ soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query)
GString *str;
char *return_result;
+ g_return_val_if_fail (uri != NULL, NULL);
+
/* IF YOU CHANGE ANYTHING IN THIS FUNCTION, RUN
* tests/uri-parsing AFTERWARD.
*/
@@ -422,7 +424,7 @@ soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query)
str = g_string_sized_new (20);
if (uri->scheme && !just_path_and_query)
- g_string_sprintfa (str, "%s:", uri->scheme);
+ g_string_append_printf (str, "%s:", uri->scheme);
if (uri->host && !just_path_and_query) {
g_string_append (str, "//");
if (uri->user) {
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c90f457a..47e75e20 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,6 +2,7 @@ INCLUDES = \
-I$(top_srcdir) \
-DSRCDIR=\""$(srcdir)"\" \
-DLIBSOUP_DISABLE_DEPRECATED \
+ $(SOUP_MAINTAINER_FLAGS) \
$(XML_CFLAGS) \
$(GLIB_CFLAGS) \
$(LIBGNUTLS_CFLAGS)
diff --git a/tests/dns.c b/tests/dns.c
index e93b0a4a..d0101ee1 100644
--- a/tests/dns.c
+++ b/tests/dns.c
@@ -57,7 +57,7 @@ main (int argc, char **argv)
}
loop = g_main_loop_new (NULL, TRUE);
- g_main_run (loop);
+ g_main_loop_run (loop);
g_main_loop_unref (loop);
return 0;
diff --git a/tests/getbug.c b/tests/getbug.c
index 19021e47..86ae3042 100644
--- a/tests/getbug.c
+++ b/tests/getbug.c
@@ -76,7 +76,7 @@ got_response (SoupSession *session, SoupMessage *msg, gpointer user_data)
g_hash_table_foreach (hash, print_struct_field, NULL);
g_hash_table_destroy (hash);
- g_main_quit (loop);
+ g_main_loop_quit (loop);
}
static void
@@ -141,7 +141,7 @@ main (int argc, char **argv)
got_response, NULL);
loop = g_main_loop_new (NULL, TRUE);
- g_main_run (loop);
+ g_main_loop_run (loop);
g_main_loop_unref (loop);
return 0;
diff --git a/tests/server-auth-test.c b/tests/server-auth-test.c
index af4ec614..51d40f43 100644
--- a/tests/server-auth-test.c
+++ b/tests/server-auth-test.c
@@ -100,7 +100,7 @@ do_test (int n, SoupURI *base_uri, const char *path,
g_child_watch_add (pid, curl_exited, &done);
while (!done)
- g_main_iteration (TRUE);
+ g_main_context_iteration (NULL, TRUE);
} else
test_data.succeeded = FALSE;
g_ptr_array_free (args, TRUE);