Mercurial > pidgin.yaz
changeset 16781:8a5fe6db7750
We don't really need an active connection to get the name of a chat.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 02 May 2007 03:51:51 +0000 |
parents | 588968d4b2c1 |
children | d7ad8013b914 |
files | libpurple/blist.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/blist.c Wed May 02 03:41:22 2007 +0000 +++ b/libpurple/blist.c Wed May 02 03:51:51 2007 +0000 @@ -2037,15 +2037,18 @@ struct proto_chat_entry *pce; GList *parts; char *ret; + PurplePlugin *prpl; + PurplePluginProtocolInfo *prpl_info = NULL; g_return_val_if_fail(chat != NULL, NULL); if ((chat->alias != NULL) && (*chat->alias != '\0')) return chat->alias; - if (chat->account->gc == NULL) - return NULL; - - parts = PURPLE_PLUGIN_PROTOCOL_INFO(chat->account->gc->prpl)->chat_info(chat->account->gc); + + prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account)); + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); + + parts = prpl_info->chat_info(chat->account->gc); pce = parts->data; ret = g_hash_table_lookup(chat->components, pce->identifier); g_list_foreach(parts, (GFunc)g_free, NULL);