ucs: accept sip: prefix in ImAdress node
authorStefan Becker <chemobejk@gmail.com>
Wed, 4 Dec 2013 14:04:46 +0000 (4 16:04 +0200)
committerStefan Becker <chemobejk@gmail.com>
Thu, 5 Dec 2013 20:48:42 +0000 (5 22:48 +0200)
It seems that on some installations ImAddress node can contain URIs with
sip: prefix. Switch from sip_uri_from_name() to sip_uri() to make sure
that we always retrieve a correct SIP URI.

(cherry picked from commit c095335dbd9c4b85d5d8a9b08cc6fac04e9c7586)

src/core/sipe-ucs.c

index faacd72..7ed233e 100644 (file)
@@ -591,7 +591,11 @@ static void sipe_ucs_get_im_item_list_response(struct sipe_core_private *sipe_pr
                        if (!(is_empty(address) || is_empty(key) || is_empty(change))) {
                                gchar *alias = sipe_xml_data(sipe_xml_child(persona_node,
                                                                            "DisplayName"));
-                               gchar *uri = sip_uri_from_name(address);
+                               /*
+                                * it seems to be undefined if ImAddress node
+                                * contains "sip:" prefix or not...
+                                */
+                               gchar *uri = sip_uri(address);
                                struct sipe_buddy *buddy = sipe_buddy_add(sipe_private,
                                                                          uri,
                                                                          key,