All pastes #73381 Raw Edit

Mine

public c v1 · immutable
#73381 ·published 2006-06-27 19:44 UTC
rendered paste body
static voidtelepathy_contact_rename(GossipProtocol * protocol,			 GossipContact * contact, const gchar * new_name){	GossipTelepathy *telepathy;	GossipTelepathyPriv *priv;	DBusGProxy *aliases_iface;	GHashTable *new_alias;	gint handle;	GError *error = NULL;	//gchar *test = NULL;		telepathy = GOSSIP_TELEPATHY (protocol);	priv = GET_PRIV (telepathy);		aliases_iface =		tp_conn_get_interface(TELEPATHY_CONN (priv->conn_obj),			TELEPATHY_CONN_IFACE_ALIASING_QUARK);		handle = (gint)gossip_telepathy_get_handle_from_contact(telepathy, contact);		DEBUG_MSG (("handle: %d", handle));		new_alias = g_hash_table_new_full (g_int_hash,g_int_equal,NULL, g_free);	DEBUG_MSG (("inserted success"));		g_hash_table_insert (new_alias,GINT_TO_POINTER (handle),g_strdup (new_name));				if (!tp_conn_iface_aliasing_set_aliases (aliases_iface, new_alias, &error))	{		DEBUG_MSG(("Didn't work: %s", error->message));		g_error_free(error);	}		g_hash_table_destroy (new_alias);		DEBUG_MSG(("telepathy_contact_rename"));    return;}