libsoup r1206 - in branches/gnome-2-24: . docs/reference libsoup
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: libsoup r1206 - in branches/gnome-2-24: . docs/reference libsoup
- Date: Sun, 23 Nov 2008 21:56:56 +0000 (UTC)
Author: danw
Date: Sun Nov 23 21:56:56 2008
New Revision: 1206
URL: http://svn.gnome.org/viewvc/libsoup?rev=1206&view=rev
Log:
pull-ups from trunk
Modified:
branches/gnome-2-24/ (props changed)
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/docs/reference/Makefile.am
branches/gnome-2-24/libsoup/soup-auth-domain-basic.h
branches/gnome-2-24/libsoup/soup-auth-domain-digest.h
branches/gnome-2-24/libsoup/soup-auth-domain.h
branches/gnome-2-24/libsoup/soup-cookie-jar.h
branches/gnome-2-24/libsoup/soup-cookie.c
branches/gnome-2-24/libsoup/soup-date.c
branches/gnome-2-24/libsoup/soup-logger.h
Modified: branches/gnome-2-24/docs/reference/Makefile.am
==============================================================================
--- branches/gnome-2-24/docs/reference/Makefile.am (original)
+++ branches/gnome-2-24/docs/reference/Makefile.am Sun Nov 23 21:56:56 2008
@@ -13,7 +13,7 @@
DOC_SOURCE_DIR=../../libsoup
# Extra options to supply to gtkdoc-scan.
-SCAN_OPTIONS=
+SCAN_OPTIONS=--deprecated-guards=LIBSOUP_DISABLE_DEPRECATED
# Extra options to supply to gtkdoc-scangobj.
SCANGOBJ_OPTIONS=--type-init-func 'g_type_init(); g_thread_init(NULL)'
Modified: branches/gnome-2-24/libsoup/soup-auth-domain-basic.h
==============================================================================
--- branches/gnome-2-24/libsoup/soup-auth-domain-basic.h (original)
+++ branches/gnome-2-24/libsoup/soup-auth-domain-basic.h Sun Nov 23 21:56:56 2008
@@ -8,6 +8,8 @@
#include <libsoup/soup-auth-domain.h>
+G_BEGIN_DECLS
+
#define SOUP_TYPE_AUTH_DOMAIN_BASIC (soup_auth_domain_basic_get_type ())
#define SOUP_AUTH_DOMAIN_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasic))
#define SOUP_AUTH_DOMAIN_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicClass))
@@ -49,4 +51,6 @@
gpointer user_data,
GDestroyNotify dnotify);
+G_END_DECLS
+
#endif /* SOUP_AUTH_DOMAIN_BASIC_H */
Modified: branches/gnome-2-24/libsoup/soup-auth-domain-digest.h
==============================================================================
--- branches/gnome-2-24/libsoup/soup-auth-domain-digest.h (original)
+++ branches/gnome-2-24/libsoup/soup-auth-domain-digest.h Sun Nov 23 21:56:56 2008
@@ -8,6 +8,8 @@
#include <libsoup/soup-auth-domain.h>
+G_BEGIN_DECLS
+
#define SOUP_TYPE_AUTH_DOMAIN_DIGEST (soup_auth_domain_digest_get_type ())
#define SOUP_AUTH_DOMAIN_DIGEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigest))
#define SOUP_AUTH_DOMAIN_DIGEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigestClass))
@@ -52,4 +54,6 @@
const char *realm,
const char *password);
+G_END_DECLS
+
#endif /* SOUP_AUTH_DOMAIN_DIGEST_H */
Modified: branches/gnome-2-24/libsoup/soup-auth-domain.h
==============================================================================
--- branches/gnome-2-24/libsoup/soup-auth-domain.h (original)
+++ branches/gnome-2-24/libsoup/soup-auth-domain.h Sun Nov 23 21:56:56 2008
@@ -8,6 +8,8 @@
#include <libsoup/soup-types.h>
+G_BEGIN_DECLS
+
#define SOUP_TYPE_AUTH_DOMAIN (soup_auth_domain_get_type ())
#define SOUP_AUTH_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN, SoupAuthDomain))
#define SOUP_AUTH_DOMAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN, SoupAuthDomainClass))
@@ -92,4 +94,6 @@
SoupMessage *msg,
const char *username);
+G_END_DECLS
+
#endif /* SOUP_AUTH_DOMAIN_H */
Modified: branches/gnome-2-24/libsoup/soup-cookie-jar.h
==============================================================================
--- branches/gnome-2-24/libsoup/soup-cookie-jar.h (original)
+++ branches/gnome-2-24/libsoup/soup-cookie-jar.h Sun Nov 23 21:56:56 2008
@@ -8,6 +8,8 @@
#include <libsoup/soup-types.h>
+G_BEGIN_DECLS
+
#define SOUP_TYPE_COOKIE_JAR (soup_cookie_jar_get_type ())
#define SOUP_COOKIE_JAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_COOKIE_JAR, SoupCookieJar))
#define SOUP_COOKIE_JAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_COOKIE_JAR, SoupCookieJarClass))
@@ -45,4 +47,6 @@
SoupURI *uri,
const char *cookie);
+G_END_DECLS
+
#endif /* SOUP_COOKIE_JAR_H */
Modified: branches/gnome-2-24/libsoup/soup-cookie.c
==============================================================================
--- branches/gnome-2-24/libsoup/soup-cookie.c (original)
+++ branches/gnome-2-24/libsoup/soup-cookie.c Sun Nov 23 21:56:56 2008
@@ -132,6 +132,8 @@
return TRUE;
if (*domain != '.')
return FALSE;
+ if (!g_ascii_strcasecmp (domain + 1, host))
+ return TRUE;
dlen = strlen (domain);
while ((match = strstr (host, domain))) {
if (!match[dlen])
@@ -675,6 +677,9 @@
g_free (cookie->domain);
g_free (cookie->path);
+ if (cookie->expires)
+ soup_date_free (cookie->expires);
+
g_slice_free (SoupCookie, cookie);
}
@@ -880,5 +885,5 @@
if (uri->path[plen] && uri->path[plen] != '/')
return FALSE;
- return TRUE;
+ return !strncmp (cookie->path, uri->path, plen);
}
Modified: branches/gnome-2-24/libsoup/soup-date.c
==============================================================================
--- branches/gnome-2-24/libsoup/soup-date.c (original)
+++ branches/gnome-2-24/libsoup/soup-date.c Sun Nov 23 21:56:56 2008
@@ -410,9 +410,13 @@
SoupDate *
soup_date_new_from_string (const char *date_string)
{
- SoupDate *date = g_slice_new (SoupDate);
+ SoupDate *date;
gboolean success;
+ g_return_val_if_fail (date_string != NULL, NULL);
+
+ date = g_slice_new (SoupDate);
+
while (g_ascii_isspace (*date_string))
date_string++;
@@ -489,6 +493,8 @@
char *
soup_date_to_string (SoupDate *date, SoupDateFormat format)
{
+ g_return_val_if_fail (date != NULL, NULL);
+
/* FIXME: offset, 8601 zones, etc */
switch (format) {
@@ -544,6 +550,8 @@
time_t tt;
GTimeVal val;
+ g_return_val_if_fail (date != NULL, 0);
+
/* FIXME: offset, etc */
if (date->year < 1970)
@@ -576,6 +584,9 @@
void
soup_date_to_timeval (SoupDate *date, GTimeVal *time)
{
+ g_return_if_fail (date != NULL);
+ g_return_if_fail (time != NULL);
+
/* FIXME: offset, etc */
time->tv_sec = rata_die_day (date) - TIME_T_EPOCH_RATA_DIE_DAY;
@@ -594,6 +605,8 @@
gboolean
soup_date_is_past (SoupDate *date)
{
+ g_return_val_if_fail (date != NULL, TRUE);
+
/* optimization */
if (date->year < 2008)
return TRUE;
@@ -610,8 +623,11 @@
SoupDate *
soup_date_copy (SoupDate *date)
{
- SoupDate *copy = g_slice_new (SoupDate);
+ SoupDate *copy;
+ g_return_val_if_fail (date != NULL, NULL);
+
+ copy = g_slice_new (SoupDate);
memcpy (copy, date, sizeof (SoupDate));
return copy;
}
@@ -625,5 +641,7 @@
void
soup_date_free (SoupDate *date)
{
+ g_return_if_fail (date != NULL);
+
g_slice_free (SoupDate, date);
}
Modified: branches/gnome-2-24/libsoup/soup-logger.h
==============================================================================
--- branches/gnome-2-24/libsoup/soup-logger.h (original)
+++ branches/gnome-2-24/libsoup/soup-logger.h Sun Nov 23 21:56:56 2008
@@ -8,6 +8,8 @@
#include <libsoup/soup-types.h>
+G_BEGIN_DECLS
+
#define SOUP_TYPE_LOGGER (soup_logger_get_type ())
#define SOUP_LOGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_LOGGER, SoupLogger))
#define SOUP_LOGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_LOGGER, SoupLoggerClass))
@@ -73,4 +75,6 @@
gpointer printer_data,
GDestroyNotify destroy);
+G_END_DECLS
+
#endif /* SOUP_LOGGER_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]