/pidgin/main: 274a5fd12285: Fix warnings
Tomasz Wasilczyk
twasilczyk at pidgin.im
Thu May 22 15:12:02 EDT 2014
Changeset: 274a5fd12285bf5a041380cab10845c5d9d32144
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-05-22 21:11 +0200
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/274a5fd12285
Description:
Fix warnings
diffstat:
libpurple/conversationtypes.c | 4 +---
libpurple/protocols/gg/chat.c | 11 +++++++----
libpurple/protocols/gg/chat.h | 3 +--
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (75 lines):
diff --git a/libpurple/conversationtypes.c b/libpurple/conversationtypes.c
--- a/libpurple/conversationtypes.c
+++ b/libpurple/conversationtypes.c
@@ -803,7 +803,6 @@ purple_chat_conversation_get_id(const Pu
static void
chat_conversation_write_message(PurpleConversation *conv, PurpleMessage *msg)
{
- PurpleAccount *account;
PurpleConversationUiOps *ops;
PurpleChatConversationPrivate *priv = PURPLE_CHAT_CONVERSATION_GET_PRIVATE(conv);
PurpleMessageFlags flags;
@@ -811,8 +810,6 @@ chat_conversation_write_message(PurpleCo
g_return_if_fail(priv != NULL);
g_return_if_fail(msg != NULL);
- account = purple_conversation_get_account(conv);
-
/* Don't display this if the person who wrote it is ignored. */
if (purple_chat_conversation_is_ignored_user(
PURPLE_CHAT_CONVERSATION(conv), purple_message_get_who(msg)))
@@ -821,6 +818,7 @@ chat_conversation_write_message(PurpleCo
}
#if 0
+ PurpleAccount *account = purple_conversation_get_account(conv);
/* XXX: this should not be necessary */
if (purple_strequal(purple_normalize(account, who), priv->nick)) {
flags |= PURPLE_MESSAGE_SEND;
diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c
--- a/libpurple/protocols/gg/chat.c
+++ b/libpurple/protocols/gg/chat.c
@@ -470,8 +470,7 @@ void ggp_chat_invite(PurpleConnection *g
}
}
-int ggp_chat_send(PurpleConnection *gc, int local_id, const char *message,
- PurpleMessageFlags flags)
+int ggp_chat_send(PurpleConnection *gc, int local_id, PurpleMessage *msg)
{
GGPInfo *info = purple_connection_get_protocol_data(gc);
PurpleChatConversation *conv;
@@ -491,14 +490,18 @@ int ggp_chat_send(PurpleConnection *gc,
ggp_chat_get_name_from_id(chat->id),
purple_connection_get_account(gc));
- gg_msg = ggp_message_format_to_gg(PURPLE_CONVERSATION(conv), message);
+ gg_msg = ggp_message_format_to_gg(PURPLE_CONVERSATION(conv),
+ purple_message_get_contents(msg));
if (gg_chat_send_message(info->session, chat->id, gg_msg, TRUE) < 0)
succ = FALSE;
g_free(gg_msg);
me = purple_account_get_username(purple_connection_get_account(gc));
- purple_serv_got_chat_in(gc, chat->local_id, me, flags, message, time(NULL));
+ purple_serv_got_chat_in(gc, chat->local_id, me,
+ purple_message_get_flags(msg),
+ purple_message_get_contents(msg),
+ purple_message_get_time(msg));
return succ ? 0 : -1;
}
diff --git a/libpurple/protocols/gg/chat.h b/libpurple/protocols/gg/chat.h
--- a/libpurple/protocols/gg/chat.h
+++ b/libpurple/protocols/gg/chat.h
@@ -49,8 +49,7 @@ void ggp_chat_join(PurpleConnection *gc,
void ggp_chat_leave(PurpleConnection *gc, int local_id);
void ggp_chat_invite(PurpleConnection *gc, int local_id, const char *message,
const char *who);
-int ggp_chat_send(PurpleConnection *gc, int local_id, const char *message,
- PurpleMessageFlags flags);
+int ggp_chat_send(PurpleConnection *gc, int local_id, PurpleMessage *msg);
void ggp_chat_got_message(PurpleConnection *gc, uint64_t chat_id,
const char *message, time_t time, uin_t who);
More information about the Commits
mailing list