g_return_if_fail if either username or password is NULL. Noted on the
authorDan Winship <danw@src.gnome.org>
Thu, 14 Aug 2008 14:38:21 +0000 (14:38 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 14 Aug 2008 14:38:21 +0000 (14:38 +0000)
* libsoup/soup-auth.c (soup_auth_authenticate): g_return_if_fail
if either username or password is NULL. Noted on the mailing list.

* libsoup/soup-auth-basic.c (authenticate): remove redundant check

svn path=/trunk/; revision=1152

ChangeLog
libsoup/soup-auth-basic.c
libsoup/soup-auth.c

index e84bee9..1496c7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,13 @@
 
        * libsoup.pc.in (Requires): Add gthread-2.0; the app must call
        g_thread_init(), but libsoup won't pull it in itself if built with
-       --as-needed, so make sure it gets pulled in from here.
+       --as-needed, so make sure it gets pulled in from here. Noted by
+       Zeeshan Ali.
+
+       * libsoup/soup-auth.c (soup_auth_authenticate): g_return_if_fail
+       if either username or password is NULL. Noted on the mailing list.
+
+       * libsoup/soup-auth-basic.c (authenticate): remove redundant check
 
 2008-08-04  Dan Winship  <danw@gnome.org>
 
index 35f4708..cf8bf47 100644 (file)
@@ -106,9 +106,6 @@ authenticate (SoupAuth *auth, const char *username, const char *password)
        char *user_pass;
        int len;
 
-       g_return_if_fail (username != NULL);
-       g_return_if_fail (password != NULL);
-
        user_pass = g_strdup_printf ("%s:%s", username, password);
        len = strlen (user_pass);
 
index 9144ec0..dc855cc 100644 (file)
@@ -302,7 +302,8 @@ soup_auth_authenticate (SoupAuth *auth, const char *username, const char *passwo
        gboolean was_authenticated;
 
        g_return_if_fail (SOUP_IS_AUTH (auth));
-       g_return_if_fail (username != NULL || password == NULL);
+       g_return_if_fail (username != NULL);
+       g_return_if_fail (password != NULL);
 
        was_authenticated = soup_auth_is_authenticated (auth);
        SOUP_AUTH_GET_CLASS (auth)->authenticate (auth, username, password);