After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 117554 - Make it visible that we are waiting for a vCard in the add-contact dialog
Make it visible that we are waiting for a vCard in the add-contact dialog
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-07-16 09:01 UTC by Mikael Hallendal
Modified: 2005-04-22 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes this bug. (4.61 KB, patch)
2003-12-14 12:24 UTC, Martyn Russell
needs-work Details | Review
Does as Richard describes (12.54 KB, patch)
2005-04-21 22:35 UTC, Martyn Russell
none Details | Review

Description Mikael Hallendal 2003-07-16 09:01:16 UTC
Now you don't know whether you are waiting for a vCard reply or if you got
an empty one back.
Comment 1 Martyn Russell 2003-12-14 12:24:56 UTC
Created attachment 22430 [details] [review]
Fixes this bug.
Comment 2 Mikael Hallendal 2003-12-20 02:28:05 UTC
Hmm .. wonder what I was thinking when doing the issue reporting. It
already does this. 

I probably meant the Contact Information dialog which says
"Information not available" all the time.

Changing the summary to reflect this.

We should probably have a timeout on the waiting for the vcard.
Comment 3 Martyn Russell 2003-12-20 18:15:39 UTC
:) 

I thought as much -  I wasn't sure what exactly you mean't either, ill
add to this patch.
Comment 4 Richard Hult 2004-01-07 01:00:57 UTC
What's the deal? I'm slightly confused by you two crackpots! ;)

Is the patch commited? Should it be commited?
Comment 5 Mikael Hallendal 2004-01-08 11:07:01 UTC
Richard, it neither is commited or should be :) I had mixed up the
description of the issue so the patch "fixed" an already working part :)
Comment 6 Richard Hult 2004-01-12 15:23:10 UTC
Ok, so the latest on this bug:

1. Make the add-contact druid display a "Retieving information"-label 
2. Have a timeout (30 sec) and cancel after that. 30 sec shouldn't
make a slow network affect things and we would handle clients that
just don't reply.
3. Fill out the values when we get the answer (like we do now),
possibly with a "Not available" label if we get empty strings.
 
Comment 7 Martyn Russell 2005-04-21 22:35:31 UTC
Created attachment 45527 [details] [review]
Does as Richard describes

One or two things to note.

1. Some people have vcards where the subnode is called "vcard" not "vCard", as
a result this means the information is not picked up.  Need to clarify the
standard on this!

2. Should this patch use the <NICKNAME> field for the nickname that is used to
populate the entry box?  Currently it is guessed from the JID.
Comment 8 Mikael Hallendal 2005-04-21 23:01:36 UTC
Added PATCH keyword.
Comment 9 Bastien Nocera 2005-04-21 23:07:51 UTC
Martyn, wouldn't it be possible to accept both vcard and vCard (and other case
combinations), but make sure to only generate vCard, as the standard would say?
Comment 10 Martyn Russell 2005-04-21 23:36:38 UTC
I guess it could be done.  

I say "some people", I have noticed one or two and they are usually done that
way because of buggy clients.

Currently the loudmouth doesn't use strcasecmp, which would mean a bit of
messing about to find the string and manually calling strcasecmp.  

This is just one instance of many XML elements which could have the same
problem.  If we allow case insensitive elements here, we really should
everywhere else.
Comment 11 Mikael Hallendal 2005-04-22 09:04:32 UTC
Hmm .. couldn't you just call:

strcasecmp (lm_message_node_get_value (node), "vcard")?

I haven't looked at the code right now so I might misremember how it's done.
Comment 12 Martyn Russell 2005-04-22 13:14:30 UTC
I think the API used in this case is:

  lm_message_node_get_child (node, "vCard")

I guess it could be done by getting each child in a for loop and strcasecmp'ing
them node names but if the "vCard" node is incorrect, the likelyhood is that the
same problems will exist with nodes like the FN, NICKNAME, etc (which are in
uppercase).

It would be a much better idea IMO to have a loudmouth API for this.
Comment 13 Mikael Hallendal 2005-04-22 16:47:43 UTC
Yeah, though I seem to recall that using anything other than vCard is not being
standard compliant. I don't really want to clutter the Loudmouth API with
functions to handle broken XML.
Comment 14 Mikael Hallendal 2005-04-22 20:57:06 UTC
Commiting this one to CVS for now, closing this but, we can discuss the issue of
broken clients (or relookup if they are broken :) in another thread.