[Evolution-hackers] Fwd: Anonymous NNTP broken caused by camel-url
- From: Karl Vogel <karl vogel gmail com>
- To: evolution-hackers lists ximian com
- Subject: [Evolution-hackers] Fwd: Anonymous NNTP broken caused by camel-url
- Date: Thu, 10 Mar 2005 23:41:36 +0100
anonymous nntp access is broken. There recently was a bugzilla entry
for this http://bugzilla.ximian.com/show_bug.cgi?id=70990 which should
have resolved the issue. However it still happens on my system.
Looking through the code, it appears the nntp provider, checks whether
a user is given by comparing the url->url field to NULL. However
camel-url will set user to a blanko string ("") if given an url like:
nntp://@news.gmane.org (which is how it is currently created by the
new account wizard)
I'm not sure what the semantic of the URL object was supposed to be?
Should empty fields be NULL or should callers compare for an empty
string aswell?
Either way.. following patch fixes the camel-url to consider
protocol://@host as not having a user and thus leave the user
properties as a NULL value.
For reference, tested on Fedora Rawhide using packages:
evolution-2.2.0-4
evolution-data-server-1.2.0-2
NOTE: try adding a new anonymous NNTP account if your installation
currently works.. as it does work if your config has an url without
the @ in it.. like nttp://news.server.com (which I believe was the way
it was created some time ago)
Index: camel/camel-url.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-url.c,v
retrieving revision 1.42
diff -u -p -r1.42 camel-url.c
--- camel/camel-url.c 12 Jan 2005 08:46:49 -0000 1.42
+++ camel/camel-url.c 6 Mar 2005 01:08:26 -0000
@@ -119,8 +119,10 @@ camel_url_new_with_base (CamelURL *base,
semi = colon;
}
- url->user = g_strndup (url_string, semi - url_string);
- camel_url_decode (url->user);
+ if (semi - url_string) {
+ url->user = g_strndup (url_string,
semi - url_string);
+ camel_url_decode (url->user);
+ }
url_string = at + 1;
} else
url->user = url->passwd = url->authmech = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]