[Telepathy-commits] [telepathy-sofiasip/master] Use the URL contact helper when creating To: headers in requests

Mikhail Zabaluev mikhail.zabaluev at nokia.com
Tue Oct 7 05:52:17 PDT 2008


Discarded the TODO comment about setting the display name in To:.
There is no meaningful use for that.
---
 src/sip-connection-helpers.c |   29 +++++++----------------------
 1 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/src/sip-connection-helpers.c b/src/sip-connection-helpers.c
index e61f985..0ccae54 100644
--- a/src/sip-connection-helpers.c
+++ b/src/sip-connection-helpers.c
@@ -51,30 +51,15 @@
  * REGISTER is special because it may tie resources on the server side */
 #define TPSIP_CONNECTION_MINIMUM_KEEPALIVE_INTERVAL_REGISTER 50
 
-static sip_to_t *priv_sip_to_url_make (TpsipConnection *conn,
-                                       su_home_t *home,
-                                       TpHandle contact)
+static sip_to_t *
+priv_sip_to_url_make (TpsipConnection *conn,
+                      su_home_t *home,
+                      TpHandle contact)
 {
-  TpHandleRepoIface *contact_repo;
-  sip_to_t *to;
-  const char *address;
-
-  contact_repo = tp_base_connection_get_handles (
-      (TpBaseConnection *)conn, TP_HANDLE_TYPE_CONTACT);
-
-  address = tp_handle_inspect (contact_repo, contact);
-  if (address == NULL)
-    return NULL;
-
-  /* TODO: set display name bound to the handle using qdata? */
-
-  to = sip_to_create (home, URL_STRING_MAKE(address));
-
-  if (to &&
-      url_sanitize(to->a_url) == 0) 
-    return to;
+  const url_t *url;
 
-  return NULL;
+  url = tpsip_conn_get_contact_url (conn, contact);
+  return sip_to_create (home, url);
 }
 
 nua_handle_t *
-- 
1.5.6.5




More information about the Telepathy-commits mailing list