/pidgin/main: da1d08d50e9c: Get chat conversation ID only once i...
Ankit Vani
a at nevitus.org
Sat Jan 11 14:29:54 EST 2014
Changeset: da1d08d50e9c21140d802ac2ace491cd64fa4682
Author: Ankit Vani <a at nevitus.org>
Date: 2014-01-12 00:58 +0530
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/da1d08d50e9c
Description:
Get chat conversation ID only once in common_send
diffstat:
libpurple/conversation.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (27 lines):
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -146,18 +146,16 @@ common_send(PurpleConversation *conv, co
purple_conversation_get_name(conv), sent);
}
}
- else {
- PurpleChatConversation *chat = PURPLE_CHAT_CONVERSATION(conv);
+ else if (PURPLE_IS_CHAT_CONVERSATION(conv)) {
+ int id = purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv));
purple_signal_emit(purple_conversations_get_handle(), "sending-chat-msg",
- account, &sent,
- purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(conv)));
+ account, &sent, id);
if (sent != NULL && sent[0] != '\0') {
- err = serv_chat_send(gc, purple_chat_conversation_get_id(chat), sent, msgflags);
+ err = serv_chat_send(gc, id, sent, msgflags);
purple_signal_emit(purple_conversations_get_handle(), "sent-chat-msg",
- account, sent,
- purple_chat_conversation_get_id(chat));
+ account, sent, id);
}
}
More information about the Commits
mailing list