pidgin: e956fcaa: Kill off many dead assignments and any u...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Aug 23 01:32:42 EDT 2010
----------------------------------------------------------------------
Revision: e956fcaa4f67bf746ff9780cb2771150e4e782ef
Parent: ebc3cb02d5baf64dfd7979d28bdf6499c7886940
Author: qulogic at pidgin.im
Date: 08/22/10 20:52:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e956fcaa4f67bf746ff9780cb2771150e4e782ef
Changelog:
Kill off many dead assignments and any useless remaining variables.
I think some of those QQ ones were actual logic errors, too.
Let me know if there were any side-effects that were cut.
Changes against parent ebc3cb02d5baf64dfd7979d28bdf6499c7886940
patched finch/gntft.c
patched finch/libgnt/gntentry.c
patched libpurple/conversation.c
patched libpurple/media/backend-fs2.c
patched libpurple/plugins/idle.c
patched libpurple/prefs.c
patched libpurple/protocols/bonjour/bonjour.c
patched libpurple/protocols/jabber/jingle/transport.c
patched libpurple/protocols/jabber/roster.c
patched libpurple/protocols/jabber/si.c
patched libpurple/protocols/msn/contact.c
patched libpurple/protocols/msn/httpconn.c
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/notification.c
patched libpurple/protocols/msn/slp.c
patched libpurple/protocols/msn/switchboard.c
patched libpurple/protocols/qq/buddy_info.c
patched libpurple/protocols/qq/buddy_list.c
patched libpurple/protocols/qq/buddy_opt.c
patched libpurple/protocols/qq/file_trans.c
patched libpurple/protocols/qq/group.c
patched libpurple/protocols/qq/group_im.c
patched libpurple/protocols/qq/group_join.c
patched libpurple/protocols/qq/group_opt.c
patched libpurple/protocols/qq/im.c
patched libpurple/protocols/qq/qq.c
patched libpurple/protocols/qq/qq_base.c
patched libpurple/protocols/qq/qq_network.c
patched libpurple/protocols/qq/qq_process.c
patched libpurple/protocols/qq/qq_trans.c
patched libpurple/protocols/qq/send_file.c
patched libpurple/protocols/yahoo/libymsg.c
patched libpurple/protocols/yahoo/yahoo_filexfer.c
patched libpurple/protocols/yahoo/yahoochat.c
patched pidgin/gtkblist.c
patched pidgin/gtkconv.c
patched pidgin/gtkdialogs.c
patched pidgin/gtkft.c
patched pidgin/gtkimhtml.c
patched pidgin/gtkimhtmltoolbar.c
patched pidgin/gtkpounce.c
patched pidgin/gtkroomlist.c
patched pidgin/gtksmiley.c
patched pidgin/gtkstatusbox.c
patched pidgin/gtkutils.c
patched pidgin/plugins/notify.c
-------------- next part --------------
============================================================
--- libpurple/prefs.c 0852297ed511a8cd39bfc70e219007ad2ff37ee2
+++ libpurple/prefs.c 7cc6a7e6bf59bf4cea5e0dbc1c6b329f64ff0712
@@ -506,7 +506,6 @@ pref_full_name(struct purple_pref *pref)
return g_strdup("/");
name = g_string_new(pref->name);
- parent = pref->parent;
for(parent = pref->parent; parent && parent->name; parent = parent->parent) {
name = g_string_prepend_c(name, '/');
============================================================
--- libpurple/conversation.c d272e427e9274e088c365ba0b1e0b5c7bf169a70
+++ libpurple/conversation.c b31a7f4e0ad86707f3b173ab36e13e159dee1686
@@ -1124,7 +1124,6 @@ purple_conv_im_start_typing_timeout(Purp
purple_conv_im_start_typing_timeout(PurpleConvIm *im, int timeout)
{
PurpleConversation *conv;
- const char *name;
g_return_if_fail(im != NULL);
@@ -1132,7 +1131,6 @@ purple_conv_im_start_typing_timeout(Purp
purple_conv_im_stop_typing_timeout(im);
conv = purple_conv_im_get_conversation(im);
- name = purple_conversation_get_name(conv);
im->typing_timeout = purple_timeout_add_seconds(timeout, reset_typing_cb, conv);
}
@@ -1520,7 +1518,6 @@ purple_conv_chat_write(PurpleConvChat *c
PurpleAccount *account;
PurpleConversation *conv;
PurpleConnection *gc;
- PurplePluginProtocolInfo *prpl_info;
g_return_if_fail(chat != NULL);
g_return_if_fail(who != NULL);
@@ -1529,7 +1526,6 @@ purple_conv_chat_write(PurpleConvChat *c
conv = purple_conv_chat_get_conversation(chat);
gc = purple_conversation_get_gc(conv);
account = purple_connection_get_account(gc);
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl(gc));
/* Don't display this if the person who wrote it is ignored. */
if (purple_conv_chat_is_user_ignored(chat, who))
============================================================
--- pidgin/plugins/notify.c 60c2908a982740a10e96e569c9ee39fc8a7b7751
+++ pidgin/plugins/notify.c a7ef531d7e3eae4cb58fd6b6ebe9e75ad6568e13
@@ -303,7 +303,6 @@ attach_signals(PurpleConversation *conv)
attach_signals(PurpleConversation *conv)
{
PidginConversation *gtkconv = NULL;
- PidginWindow *gtkwin = NULL;
GSList *imhtml_ids = NULL, *entry_ids = NULL;
guint id;
@@ -313,8 +312,6 @@ attach_signals(PurpleConversation *conv)
return 0;
}
- gtkwin = gtkconv->win;
-
if (purple_prefs_get_bool("/plugins/gtk/X11/notify/notify_focus")) {
/* TODO should really find a way to make this work no matter
* where the focus is inside the conv window, without having
@@ -358,13 +355,11 @@ detach_signals(PurpleConversation *conv)
detach_signals(PurpleConversation *conv)
{
PidginConversation *gtkconv = NULL;
- PidginWindow *gtkwin = NULL;
GSList *ids = NULL, *l;
gtkconv = PIDGIN_CONVERSATION(conv);
if (!gtkconv)
return;
- gtkwin = gtkconv->win;
ids = purple_conversation_get_data(conv, "notify-imhtml-signals");
for (l = ids; l != NULL; l = l->next)
@@ -650,7 +645,6 @@ apply_method()
apply_method()
{
GList *convs;
- PidginWindow *purplewin = NULL;
for (convs = purple_get_conversations(); convs != NULL;
convs = convs->next) {
@@ -659,7 +653,6 @@ apply_method()
/* remove notifications */
unnotify(conv, FALSE);
- purplewin = PIDGIN_CONVERSATION(conv)->win;
if (GPOINTER_TO_INT(purple_conversation_get_data(conv, "notify-message-count")) != 0)
/* reattach appropriate notifications */
notify(conv, FALSE);
============================================================
--- pidgin/gtkimhtml.c 9e71e4aad2a78354774e3eb6d67c3f8859ef3f90
+++ pidgin/gtkimhtml.c b582b8f420d6a80e0f655f176a4309e9771d4682
@@ -1476,10 +1476,8 @@ static void gtk_imhtml_class_init (GtkIM
static void gtk_imhtml_class_init (GtkIMHtmlClass *klass)
{
GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
- GtkObjectClass *object_class;
GtkBindingSet *binding_set;
GObjectClass *gobject_class;
- object_class = (GtkObjectClass*) klass;
gobject_class = (GObjectClass*) klass;
parent_class = g_type_class_ref(GTK_TYPE_TEXT_VIEW);
signals[URL_CLICKED] = g_signal_new("url_clicked",
============================================================
--- libpurple/protocols/msn/msn.c 3b2fbec6c78ed81ed731ccdfb85343a0b99d7478
+++ libpurple/protocols/msn/msn.c a83230a08d7fcf9531fc9e9add467b6272afdee9
@@ -622,7 +622,6 @@ show_send_to_mobile_cb(PurpleBlistNode *
{
PurpleBuddy *buddy;
PurpleConnection *gc;
- MsnSession *session;
MsnMobileData *data;
PurpleAccount *account;
const char *name;
@@ -634,8 +633,6 @@ show_send_to_mobile_cb(PurpleBlistNode *
gc = purple_account_get_connection(account);
name = purple_buddy_get_name(buddy);
- session = gc->proto_data;
-
data = g_new0(MsnMobileData, 1);
data->gc = gc;
data->passport = name;
@@ -2084,11 +2081,9 @@ msn_remove_group(PurpleConnection *gc, P
msn_remove_group(PurpleConnection *gc, PurpleGroup *group)
{
MsnSession *session;
- MsnCmdProc *cmdproc;
const char *gname;
session = gc->proto_data;
- cmdproc = session->notification->cmdproc;
gname = purple_group_get_name(group);
purple_debug_info("msn", "Remove group %s\n", gname);
============================================================
--- libpurple/protocols/yahoo/libymsg.c 7391ab5db5a30f95558539984f67c460a94d25d2
+++ libpurple/protocols/yahoo/libymsg.c ede49fc83fb4fba337d5bca27d26fa20595039b8
@@ -3906,7 +3906,6 @@ static void yahoo_game(PurpleBlistNode *
PurpleBuddy *buddy;
PurpleConnection *gc;
- YahooData *yd;
const char *game;
char *game2;
char *t;
@@ -3917,7 +3916,6 @@ static void yahoo_game(PurpleBlistNode *
buddy = (PurpleBuddy *) node;
gc = purple_account_get_connection(purple_buddy_get_account(buddy));
- yd = (YahooData *) gc->proto_data;
f = yahoo_friend_find(gc, purple_buddy_get_name(buddy));
if (!f)
@@ -4941,7 +4939,6 @@ void yahoo_add_buddy(PurpleConnection *g
struct yahoo_packet *pkt;
const char *group = NULL;
char *group2;
- YahooFriend *f;
const char *bname;
const char *fed_bname;
YahooFederation fed = YAHOO_FEDERATION_NONE;
@@ -4953,7 +4950,6 @@ void yahoo_add_buddy(PurpleConnection *g
if (!purple_privacy_check(purple_connection_get_account(gc), bname))
return;
- f = yahoo_friend_find(gc, bname);
fed = yahoo_get_federation_from_name(bname);
if (fed != YAHOO_FEDERATION_NONE)
fed_bname += 4;
@@ -5216,15 +5212,11 @@ yahoopurple_cmd_chat_join(PurpleConversa
{
GHashTable *comp;
PurpleConnection *gc;
- YahooData *yd;
- int id;
if (!args || !args[0])
return PURPLE_CMD_RET_FAILED;
gc = purple_conversation_get_gc(conv);
- yd = gc->proto_data;
- id = yd->conf_id;
purple_debug_info("yahoo", "Trying to join %s \n", args[0]);
comp = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
============================================================
--- libpurple/plugins/idle.c 060f0c3502b52ed82201e890dc8d61259ec85c74
+++ libpurple/plugins/idle.c 8d50d36d3fd946f6837720ce1386601a7ab8d307
@@ -110,9 +110,6 @@ idle_all_action_ok(void *ignored, Purple
for(iter = list; iter; iter = iter->next) {
acct = (PurpleAccount *)(iter->data);
- if(acct)
- prpl_id = purple_account_get_protocol_id(acct);
-
if(acct && idleable_filter(acct)) {
purple_debug_misc("idle", "Idling %s.\n",
purple_account_get_username(acct));
============================================================
--- pidgin/gtkconv.c cef422192a37a5966dba76f5b879e24470fce162
+++ pidgin/gtkconv.c 05e49eb1dbefb89a941ec6a6985ef4c98ae7f13e
@@ -750,9 +750,9 @@ do_invite(GtkWidget *w, int resp, Invite
do_invite(GtkWidget *w, int resp, InviteBuddyInfo *info)
{
const char *buddy, *message;
- PidginConversation *gtkconv;
+ PurpleConversation *conv;
- gtkconv = PIDGIN_CONVERSATION(info->conv);
+ conv = info->conv;
if (resp == GTK_RESPONSE_OK) {
buddy = gtk_entry_get_text(GTK_ENTRY(info->entry));
@@ -761,8 +761,8 @@ do_invite(GtkWidget *w, int resp, Invite
if (!g_ascii_strcasecmp(buddy, ""))
return;
- serv_chat_invite(purple_conversation_get_gc(info->conv),
- purple_conv_chat_get_id(PURPLE_CONV_CHAT(info->conv)),
+ serv_chat_invite(purple_conversation_get_gc(conv),
+ purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
message, buddy);
}
@@ -856,7 +856,6 @@ invite_cb(GtkWidget *widget, PidginConve
InviteBuddyInfo *info = NULL;
if (invite_dialog == NULL) {
- PurpleConnection *gc;
PidginWindow *gtkwin;
GtkWidget *label;
GtkWidget *vbox, *hbox;
@@ -869,7 +868,6 @@ invite_cb(GtkWidget *widget, PidginConve
info = g_new0(InviteBuddyInfo, 1);
info->conv = conv;
- gc = purple_conversation_get_gc(conv);
gtkwin = pidgin_conv_get_window(gtkconv);
/* Create the new dialog. */
@@ -1200,12 +1198,10 @@ menu_insert_image_cb(gpointer data, guin
menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget)
{
PidginWindow *win = data;
- PurpleConversation *conv;
PidginConversation *gtkconv;
GtkIMHtmlToolbar *toolbar;
gtkconv = pidgin_conv_window_get_active_gtkconv(win);
- conv = gtkconv->active_conv;
toolbar = GTK_IMHTMLTOOLBAR(gtkconv->toolbar);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->image),
@@ -1911,10 +1907,8 @@ conv_keypress_common(PidginConversation
conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event)
{
PidginWindow *win;
- PurpleConversation *conv;
int curconv;
- conv = gtkconv->active_conv;
win = gtkconv->win;
curconv = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook));
@@ -2009,13 +2003,11 @@ entry_key_press_cb(GtkWidget *entry, Gdk
static gboolean
entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data)
{
- PidginWindow *win;
PurpleConversation *conv;
PidginConversation *gtkconv;
gtkconv = (PidginConversation *)data;
conv = gtkconv->active_conv;
- win = gtkconv->win;
if (conv_keypress_common(gtkconv, event))
return TRUE;
@@ -2350,12 +2342,9 @@ insert_text_cb(GtkTextBuffer *textbuffer
gchar *new_text, gint new_text_length, gpointer user_data)
{
PidginConversation *gtkconv = (PidginConversation *)user_data;
- PurpleConversation *conv;
g_return_if_fail(gtkconv != NULL);
- conv = gtkconv->active_conv;
-
if (!purple_prefs_get_bool("/purple/conversations/im/send_typing"))
return;
@@ -2617,7 +2606,6 @@ redraw_icon(gpointer data)
PidginConversation *gtkconv = (PidginConversation *)data;
PurpleConversation *conv = gtkconv->active_conv;
PurpleAccount *account;
- PurplePluginProtocolInfo *prpl_info = NULL;
GdkPixbuf *buf;
GdkPixbuf *scale;
@@ -2628,9 +2616,7 @@ redraw_icon(gpointer data)
gtkconv = PIDGIN_CONVERSATION(conv);
account = purple_conversation_get_account(conv);
- if(account && account->gc) {
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
- } else {
+ if (!(account && account->gc)) {
gtkconv->u.im->icon_timer = 0;
return FALSE;
}
@@ -2702,7 +2688,6 @@ remove_icon(GtkWidget *widget, PidginCon
GList *children;
GtkWidget *event;
PurpleConversation *conv = gtkconv->active_conv;
- PidginWindow *gtkwin;
g_return_if_fail(conv != NULL);
@@ -2730,8 +2715,6 @@ remove_icon(GtkWidget *widget, PidginCon
gtkconv->u.im->anim = NULL;
gtkconv->u.im->iter = NULL;
gtkconv->u.im->show_icon = FALSE;
-
- gtkwin = gtkconv->win;
}
static void
@@ -3684,13 +3667,10 @@ update_typing_icon(PidginConversation *g
static void
update_typing_icon(PidginConversation *gtkconv)
{
- PidginWindow *gtkwin;
PurpleConvIm *im = NULL;
PurpleConversation *conv = gtkconv->active_conv;
char *message = NULL;
- gtkwin = gtkconv->win;
-
if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
im = PURPLE_CONV_IM(conv);
@@ -5740,10 +5720,8 @@ pidgin_conv_write_conv(PurpleConversatio
time_t mtime)
{
PidginConversation *gtkconv;
- PidginWindow *win;
PurpleConnection *gc;
PurpleAccount *account;
- PurplePluginProtocolInfo *prpl_info;
int gtk_font_options = 0;
int gtk_font_options_all = 0;
int max_scrollback_lines;
@@ -5830,9 +5808,6 @@ pidgin_conv_write_conv(PurpleConversatio
g_free(tmp);
}
- win = gtkconv->win;
- prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
-
line_count = gtk_text_buffer_get_line_count(
gtk_text_view_get_buffer(GTK_TEXT_VIEW(
gtkconv->imhtml)));
@@ -6263,7 +6238,6 @@ pidgin_conv_chat_update_user(PurpleConve
pidgin_conv_chat_update_user(PurpleConversation *conv, const char *user)
{
PurpleConvChat *chat;
- PurpleConvChatBuddyFlags flags;
PurpleConvChatBuddy *cbuddy;
PidginConversation *gtkconv;
PidginChatPane *gtkchat;
@@ -6306,8 +6280,6 @@ pidgin_conv_chat_update_user(PurpleConve
g_return_if_fail(alias != NULL);
- flags = purple_conv_chat_user_get_flags(chat, user);
-
cbuddy = purple_conv_chat_cb_find(chat, user);
if (cbuddy)
add_chat_buddy_common(conv, cbuddy, NULL);
@@ -6729,7 +6701,6 @@ pidgin_conv_update_fields(PurpleConversa
PurpleConvIm *im = NULL;
PurpleAccount *account = purple_conversation_get_account(conv);
PurpleBuddy *buddy = NULL;
- PurplePresence *p = NULL;
char *markup = NULL;
AtkObject *accessibility_obj;
/* I think this is a little longer than it needs to be but I'm lazy. */
@@ -6749,7 +6720,6 @@ pidgin_conv_update_fields(PurpleConversa
if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
buddy = purple_find_buddy(account, conv->name);
if (buddy) {
- p = purple_buddy_get_presence(buddy);
markup = pidgin_blist_get_name_markup(buddy, FALSE, FALSE);
} else {
markup = title;
@@ -6964,7 +6934,6 @@ pidgin_conv_update_buddy_icon(PurpleConv
int size = 0;
PurpleAccount *account;
- PurplePluginProtocolInfo *prpl_info = NULL;
PurpleBuddyIcon *icon;
@@ -6981,8 +6950,6 @@ pidgin_conv_update_buddy_icon(PurpleConv
return;
account = purple_conversation_get_account(conv);
- if(account && account->gc)
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
/* Remove the current icon stuff */
children = gtk_container_get_children(GTK_CONTAINER(gtkconv->u.im->icon_container));
@@ -8627,7 +8594,7 @@ notebook_press_cb(GtkWidget *widget, Gdk
static gboolean
notebook_press_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win)
{
- gint nb_x, nb_y, x_rel, y_rel;
+ gint nb_x, nb_y;
int tab_clicked;
GtkWidget *page;
GtkWidget *tab;
@@ -8670,9 +8637,6 @@ notebook_press_cb(GtkWidget *widget, Gdk
*/
gdk_window_get_origin(win->notebook->window, &nb_x, &nb_y);
- x_rel = e->x_root - nb_x;
- y_rel = e->y_root - nb_y;
-
/* Reset the min/max x/y */
win->drag_min_x = 0;
win->drag_min_y = 0;
@@ -9239,6 +9203,7 @@ pidgin_conv_set_position_size(PidginWind
if (win && win->window &&
!GTK_WIDGET_VISIBLE(win->window) && conv_width != 0) {
+#ifdef _WIN32 /* only override window manager placement on Windows */
/* ...check position is on screen... */
if (conv_x >= gdk_screen_width())
conv_x = gdk_screen_width() - 100;
@@ -9251,7 +9216,6 @@ pidgin_conv_set_position_size(PidginWind
conv_y = 100;
/* ...and move it back. */
-#ifdef _WIN32 /* only override window manager placement on Windows */
gtk_window_move(GTK_WINDOW(win->window), conv_x, conv_y);
#endif
gtk_window_resize(GTK_WINDOW(win->window), conv_width, conv_height);
@@ -9503,7 +9467,7 @@ pidgin_conv_window_add_gtkconv(PidginWin
gtk_widget_show(gtkconv->menu_tabby);
- if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
+ if (conv_type == PURPLE_CONV_TYPE_IM)
pidgin_conv_update_buddy_icon(conv);
/* Build and set conversations tab */
@@ -9630,9 +9594,7 @@ pidgin_conv_window_remove_gtkconv(Pidgin
pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv)
{
unsigned int index;
- PurpleConversationType conv_type;
- conv_type = purple_conversation_get_type(gtkconv->active_conv);
index = gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont);
g_object_ref(gtkconv->tab_cont);
@@ -9965,12 +9927,9 @@ conv_placement_by_group(PidginConversati
static void
conv_placement_by_group(PidginConversation *conv)
{
- PurpleConversationType type;
PurpleGroup *group = NULL;
GList *wl, *cl;
- type = purple_conversation_get_type(conv->active_conv);
-
group = conv_get_group(conv);
/* Go through the list of IMs and find one with this group. */
@@ -10004,12 +9963,10 @@ conv_placement_by_account(PidginConversa
static void
conv_placement_by_account(PidginConversation *conv)
{
- PurpleConversationType type;
GList *wins, *convs;
PurpleAccount *account;
account = purple_conversation_get_account(conv->active_conv);
- type = purple_conversation_get_type(conv->active_conv);
/* Go through the list of IMs and find one with this group. */
for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) {
============================================================
--- pidgin/gtkutils.c f4b39465e2df3f4e5361cbf6807dedddff1b32ce
+++ pidgin/gtkutils.c ac3fe57287f1edfe7c47fd07af973a84f2f5e9ca
@@ -680,7 +680,6 @@ create_protocols_menu(const char *defaul
create_protocols_menu(const char *default_proto_id)
{
AopMenu *aop_menu = NULL;
- PurplePluginProtocolInfo *prpl_info;
PurplePlugin *plugin;
GdkPixbuf *pixbuf = NULL;
GtkSizeGroup *sg;
@@ -702,7 +701,6 @@ create_protocols_menu(const char *defaul
p = p->next, i++) {
plugin = (PurplePlugin *)p->data;
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(plugin);
if (gtalk_name && strcmp(gtalk_name, plugin->info->name) < 0) {
char *filename = g_build_filename(DATADIR, "pixmaps", "pidgin", "protocols",
@@ -784,8 +782,6 @@ create_account_menu(PurpleAccount *defau
sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
for (p = list, i = 0; p != NULL; p = p->next, i++) {
- PurplePlugin *plugin;
-
if (show_all)
account = (PurpleAccount *)p->data;
else {
@@ -799,8 +795,6 @@ create_account_menu(PurpleAccount *defau
continue;
}
- plugin = purple_find_prpl(purple_account_get_protocol_id(account));
-
pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL);
if (pixbuf) {
@@ -2790,14 +2784,13 @@ gboolean pidgin_gdk_pixbuf_is_opaque(Gdk
gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf) {
- int width, height, rowstride, i;
+ int height, rowstride, i;
unsigned char *pixels;
unsigned char *row;
if (!gdk_pixbuf_get_has_alpha(pixbuf))
return TRUE;
- width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
pixels = gdk_pixbuf_get_pixels (pixbuf);
============================================================
--- pidgin/gtkft.c 19b11b81480260ea38fe6fdbfc9dc211348d2bb5
+++ pidgin/gtkft.c 023a216dcfc8658affee6a1522c7f527213edb65
@@ -112,13 +112,10 @@ get_xfer_info_strings(PurpleXfer *xfer,
get_xfer_info_strings(PurpleXfer *xfer, char **kbsec, char **time_elapsed,
char **time_remaining)
{
- PidginXferUiData *data;
double kb_sent, kb_rem;
double kbps = 0.0;
time_t elapsed, now;
- data = PIDGINXFER(xfer);
-
if (xfer->end_time != 0)
now = xfer->end_time;
else
@@ -1015,7 +1012,6 @@ pidgin_xfer_dialog_update_xfer(PidginXfe
{
PidginXferUiData *data;
char *size_str, *remaining_str;
- GtkTreeSelection *selection;
time_t current_time;
GtkTreeIter iter;
gboolean valid;
@@ -1066,8 +1062,6 @@ pidgin_xfer_dialog_update_xfer(PidginXfe
g_object_unref(pixbuf);
}
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(xfer_dialog->tree));
-
update_title_progress(dialog);
if (xfer == dialog->selected_xfer)
update_detailed_info(xfer_dialog, xfer);
============================================================
--- libpurple/protocols/msn/switchboard.c bb960ebe9c9c6a1c36902b33ff6a622e499f1e44
+++ libpurple/protocols/msn/switchboard.c 076d29878077202d828299e138b276420e8f1475
@@ -761,12 +761,8 @@ iro_cmd(MsnCmdProc *cmdproc, MsnCommand
static void
iro_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
- PurpleAccount *account;
- PurpleConnection *gc;
MsnSwitchBoard *swboard;
- account = cmdproc->session->account;
- gc = account->gc;
swboard = cmdproc->data;
swboard->total_users = atoi(cmd->params[2]);
@@ -778,16 +774,12 @@ joi_cmd(MsnCmdProc *cmdproc, MsnCommand
joi_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
MsnSession *session;
- PurpleAccount *account;
- PurpleConnection *gc;
MsnSwitchBoard *swboard;
const char *passport;
passport = cmd->params[0];
session = cmdproc->session;
- account = session->account;
- gc = account->gc;
swboard = cmdproc->data;
msn_switchboard_add_user(swboard, passport);
============================================================
--- pidgin/gtkpounce.c 759aed093863ebd4fcc5bdbc57adf183de1cb899
+++ pidgin/gtkpounce.c 1f197cddf4e2ac49b697f8d52e3269d0f56757ee
@@ -194,7 +194,6 @@ add_pounce_to_treeview(GtkListStore *mod
{
GtkTreeIter iter;
PurpleAccount *account;
- PurplePounceEvent events;
gboolean recurring;
const char *pouncer;
const char *pouncee;
@@ -202,8 +201,6 @@ add_pounce_to_treeview(GtkListStore *mod
account = purple_pounce_get_pouncer(pounce);
- events = purple_pounce_get_events(pounce);
-
pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM);
pouncer = purple_account_get_username(account);
============================================================
--- pidgin/gtkblist.c 0a64110bb315821dec175defc0f634fc93f4c615
+++ pidgin/gtkblist.c fcaebfb563db77cb87bb9c57f840a88766acc10e
@@ -3965,7 +3965,6 @@ static char *pidgin_get_tooltip_text(Pur
tmp);
g_free(tmp);
}
- count = 0;
count = purple_blist_get_group_size(group, FALSE);
if (count != 0) {
@@ -3976,7 +3975,6 @@ static char *pidgin_get_tooltip_text(Pur
tmp);
g_free(tmp);
}
- count = 0;
tmp = purple_notify_user_info_get_text_with_newline(user_info, "\n");
g_string_append(str, tmp);
@@ -4023,7 +4021,6 @@ pidgin_blist_get_emblem(PurpleBlistNode
{
PurpleBuddy *buddy = NULL;
struct _pidgin_blist_node *gtknode = node->ui_data;
- struct _pidgin_blist_node *gtkbuddynode = NULL;
PurplePlugin *prpl;
PurplePluginProtocolInfo *prpl_info;
const char *name = NULL;
@@ -4034,11 +4031,9 @@ pidgin_blist_get_emblem(PurpleBlistNode
if(PURPLE_BLIST_NODE_IS_CONTACT(node)) {
if(!gtknode->contact_expanded) {
buddy = purple_contact_get_priority_buddy((PurpleContact*)node);
- gtkbuddynode = ((PurpleBlistNode*)buddy)->ui_data;
}
} else if(PURPLE_BLIST_NODE_IS_BUDDY(node)) {
buddy = (PurpleBuddy*)node;
- gtkbuddynode = node->ui_data;
p = purple_buddy_get_presence(buddy);
if (purple_presence_is_status_primitive_active(p, PURPLE_STATUS_MOBILE)) {
/* This emblem comes from the small emoticon set now,
@@ -4131,7 +4126,6 @@ pidgin_blist_get_status_icon(PurpleBlist
pidgin_blist_get_status_icon(PurpleBlistNode *node, PidginStatusIconSize size)
{
GdkPixbuf *ret;
- const char *protoname = NULL;
const char *icon = NULL;
struct _pidgin_blist_node *gtknode = node->ui_data;
struct _pidgin_blist_node *gtkbuddynode = NULL;
@@ -4158,7 +4152,6 @@ pidgin_blist_get_status_icon(PurpleBlist
if(buddy || chat) {
PurpleAccount *account;
PurplePlugin *prpl;
- PurplePluginProtocolInfo *prpl_info;
if(buddy)
account = buddy->account;
@@ -4168,12 +4161,6 @@ pidgin_blist_get_status_icon(PurpleBlist
prpl = purple_find_prpl(purple_account_get_protocol_id(account));
if(!prpl)
return NULL;
-
- prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
-
- if(prpl_info && prpl_info->list_icon) {
- protoname = prpl_info->list_icon(account, buddy);
- }
}
if(buddy) {
============================================================
--- libpurple/protocols/msn/notification.c 63571bb4f0db726216a123a8058443eae94bf093
+++ libpurple/protocols/msn/notification.c 47a6a80c066108485b6aa68c7856faeac864a3d9
@@ -92,7 +92,6 @@ connect_cb(MsnServConn *servconn)
{
MsnCmdProc *cmdproc;
MsnSession *session;
- PurpleAccount *account;
GString *vers;
const char *ver_str;
int i;
@@ -101,7 +100,6 @@ connect_cb(MsnServConn *servconn)
cmdproc = servconn->cmdproc;
session = servconn->session;
- account = session->account;
vers = g_string_new("");
@@ -178,10 +176,8 @@ usr_cmd(MsnCmdProc *cmdproc, MsnCommand
usr_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
{
MsnSession *session;
- PurpleAccount *account;
session = cmdproc->session;
- account = session->account;
if (!g_ascii_strcasecmp(cmd->params[1], "OK"))
{
@@ -1000,7 +996,6 @@ iln_cmd(MsnCmdProc *cmdproc, MsnCommand
{
MsnSession *session;
PurpleAccount *account;
- PurpleConnection *gc;
MsnUser *user;
MsnObject *msnobj = NULL;
unsigned long clientid;
@@ -1010,7 +1005,6 @@ iln_cmd(MsnCmdProc *cmdproc, MsnCommand
session = cmdproc->session;
account = session->account;
- gc = purple_account_get_connection(account);
state = cmd->params[1];
passport = cmd->params[2];
@@ -1203,7 +1197,6 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand
{
MsnSession *session;
PurpleAccount *account;
- PurpleConnection *gc;
MsnUser *user;
MsnObject *msnobj;
unsigned long clientid;
@@ -1212,7 +1205,6 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand
session = cmdproc->session;
account = session->account;
- gc = purple_account_get_connection(account);
state = cmd->params[0];
passport = cmd->params[1];
@@ -1387,11 +1379,13 @@ rng_cmd(MsnCmdProc *cmdproc, MsnCommand
MsnSession *session;
MsnSwitchBoard *swboard;
const char *session_id;
+ const char *auth_key;
char *host;
int port;
session = cmdproc->session;
session_id = cmd->params[0];
+ auth_key = cmd->params[3];
msn_parse_socket(cmd->params[1], &host, &port);
@@ -1401,8 +1395,8 @@ rng_cmd(MsnCmdProc *cmdproc, MsnCommand
swboard = msn_switchboard_new(session);
msn_switchboard_set_invited(swboard, TRUE);
- msn_switchboard_set_session_id(swboard, cmd->params[0]);
- msn_switchboard_set_auth_key(swboard, cmd->params[3]);
+ msn_switchboard_set_session_id(swboard, session_id);
+ msn_switchboard_set_auth_key(swboard, auth_key);
swboard->im_user = g_strdup(cmd->params[4]);
/* msn_switchboard_add_user(swboard, cmd->params[4]); */
@@ -1571,13 +1565,11 @@ ubx_cmd_post(MsnCmdProc *cmdproc, MsnCom
size_t len)
{
MsnSession *session;
- PurpleAccount *account;
MsnUser *user;
const char *passport;
char *str;
session = cmdproc->session;
- account = session->account;
passport = cmd->params[0];
user = msn_userlist_find_user(session->userlist, passport);
@@ -1649,7 +1641,9 @@ profile_msg(MsnCmdProc *cmdproc, MsnMess
{
MsnSession *session;
const char *value;
+#ifdef MSN_PARTIAL_LISTS
const char *clLastChange;
+#endif
session = cmdproc->session;
@@ -1692,9 +1686,9 @@ profile_msg(MsnCmdProc *cmdproc, MsnMess
if ((value = msn_message_get_attr(msg, "EmailEnabled")) != NULL)
session->passport_info.email_enabled = (gboolean)atol(value);
+#ifdef MSN_PARTIAL_LISTS
/*starting retrieve the contact list*/
clLastChange = purple_account_get_string(session->account, "CLLastChange", NULL);
-#ifdef MSN_PARTIAL_LISTS
/* msn_userlist_load defeats all attempts at trying to detect blist sync issues */
msn_userlist_load(session);
msn_get_contact_list(session, MSN_PS_INITIAL, clLastChange);
============================================================
--- libpurple/protocols/yahoo/yahoochat.c bf69f24ffbd9b7ebc9fb9ac1a58af72fa237ac49
+++ libpurple/protocols/yahoo/yahoochat.c 6d9b388512012554c254c6e8e4ab40d0c0ee7902
@@ -617,10 +617,7 @@ void yahoo_process_chat_exit(PurpleConne
char *who = NULL;
char *room = NULL;
GSList *l;
- YahooData *yd;
- yd = gc->proto_data;
-
for (l = pkt->hash; l; l = l->next) {
struct yahoo_pair *pair = l->data;
@@ -638,8 +635,7 @@ void yahoo_process_chat_exit(PurpleConne
purple_conv_chat_remove_user(PURPLE_CONV_CHAT(c), who, NULL);
}
- if (room)
- g_free(room);
+ g_free(room);
}
void yahoo_process_chat_message(PurpleConnection *gc, struct yahoo_packet *pkt)
============================================================
--- libpurple/protocols/jabber/roster.c 2a1c4c9b444c919089b4ed98041c6214a5ec97c4
+++ libpurple/protocols/jabber/roster.c c677dcf83d8fd19c3d99b04e33d248559a1afc79
@@ -76,12 +76,9 @@ void jabber_roster_request(JabberStream
void jabber_roster_request(JabberStream *js)
{
- PurpleAccount *account;
JabberIq *iq;
xmlnode *query;
- account = purple_connection_get_account(js->gc);
-
iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:roster");
query = xmlnode_get_child(iq->node, "query");
============================================================
--- libpurple/protocols/jabber/si.c 92ed6a726f7863b90fc133ab8a07089f9833a5ac
+++ libpurple/protocols/jabber/si.c 9b715f685fd833596a3c0dc40964a1b91ad3c49c
@@ -1666,12 +1666,8 @@ void jabber_si_xfer_send(PurpleConnectio
void jabber_si_xfer_send(PurpleConnection *gc, const char *who, const char *file)
{
- JabberStream *js;
-
PurpleXfer *xfer;
- js = gc->proto_data;
-
xfer = jabber_si_new_xfer(gc, who);
if (file)
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c f114dd82da4415ffe27cbf3a6f90b86e8216ff3a
+++ libpurple/protocols/yahoo/yahoo_filexfer.c 88453802be00a9217ba1d73a11d26c4075facd66
@@ -1235,14 +1235,14 @@ static void yahoo_xfer_connected_15(gpoi
PurpleXfer *xfer;
struct yahoo_xfer_data *xd;
PurpleAccount *account;
- YahooData* yd;
+ PurpleConnection *gc;
if (!(xfer = data))
return;
if (!(xd = xfer->data))
return;
- yd = xd->gc->proto_data;
- account = purple_connection_get_account(xd->gc);
+ gc = xd->gc;
+ account = purple_connection_get_account(gc);
if ((source < 0) || (xd->path == NULL) || (xd->host == NULL)) {
purple_xfer_error(PURPLE_XFER_RECEIVE, purple_xfer_get_account(xfer),
xfer->who, _("Unable to connect."));
@@ -1253,7 +1253,7 @@ static void yahoo_xfer_connected_15(gpoi
if (xd->txbuflen == 0)
{
gchar* cookies;
- cookies = yahoo_get_cookies(xd->gc);
+ cookies = yahoo_get_cookies(gc);
if(purple_xfer_get_type(xfer) == PURPLE_XFER_SEND && xd->status_15 == ACCEPTED)
{
if(xd->info_val_249 == 2)
============================================================
--- pidgin/gtkroomlist.c 52f844d547cfcba5389d2631c9214115af499495
+++ pidgin/gtkroomlist.c f846769e0268f5388753bb7b70c891f368daf247
@@ -362,8 +362,6 @@ pidgin_roomlist_paint_tooltip(GtkWidget
style = grl->tipwindow->style;
- max_text_width = 0;
-
max_text_width = MAX(grl->tip_width, grl->tip_name_width);
max_width = TOOLTIP_BORDER + SMALL_SPACE + max_text_width + TOOLTIP_BORDER;
============================================================
--- pidgin/gtkimhtmltoolbar.c 57b3e49168cbf48bb5af92a9e89242d5962d00fc
+++ pidgin/gtkimhtmltoolbar.c d92ccbb3d9c76c46df9d646431a1bd5ff7b71fac
@@ -1205,9 +1205,7 @@ static void gtk_imhtmltoolbar_class_init
/* Boring GTK+ stuff */
static void gtk_imhtmltoolbar_class_init (GtkIMHtmlToolbarClass *class)
{
- GtkObjectClass *object_class;
GObjectClass *gobject_class;
- object_class = (GtkObjectClass*) class;
gobject_class = (GObjectClass*) class;
parent_class = g_type_class_ref(GTK_TYPE_HBOX);
gobject_class->finalize = gtk_imhtmltoolbar_finalize;
============================================================
--- libpurple/protocols/msn/slp.c 02105528e7422e5afa37fdcdaf6342d91b60d2eb
+++ libpurple/protocols/msn/slp.c f8ab7fe26bd4244db9b4299ace03320a7ac8a799
@@ -1263,8 +1263,6 @@ msn_release_buddy_icon_request(MsnUserLi
if (userlist->buddy_icon_window > 0)
{
GQueue *queue;
- PurpleAccount *account;
- const char *username;
queue = userlist->buddy_icon_requests;
@@ -1273,9 +1271,6 @@ msn_release_buddy_icon_request(MsnUserLi
user = g_queue_pop_head(queue);
- account = userlist->session->account;
- username = user->passport;
-
userlist->buddy_icon_window--;
request_user_display(user);
@@ -1347,31 +1342,21 @@ got_user_display(MsnSlpCall *slpcall,
got_user_display(MsnSlpCall *slpcall,
const guchar *data, gsize size)
{
- MsnUserList *userlist;
+ MsnSlpLink *slplink;
const char *info;
PurpleAccount *account;
g_return_if_fail(slpcall != NULL);
+ slplink = slpcall->slplink;
info = slpcall->data_info;
if (purple_debug_is_verbose())
- purple_debug_info("msn", "Got User Display: %s\n", slpcall->slplink->remote_user);
+ purple_debug_info("msn", "Got User Display: %s\n", slplink->remote_user);
- userlist = slpcall->slplink->session->userlist;
- account = slpcall->slplink->session->account;
+ account = slplink->session->account;
- purple_buddy_icons_set_for_user(account, slpcall->slplink->remote_user,
+ purple_buddy_icons_set_for_user(account, slplink->remote_user,
g_memdup(data, size), size, info);
-
-#if 0
- /* Free one window slot */
- userlist->buddy_icon_window++;
-
- purple_debug_info("msn", "got_user_display(): buddy_icon_window++ yields =%d\n",
- userlist->buddy_icon_window);
-
- msn_release_buddy_icon_request(userlist);
-#endif
}
static void
============================================================
--- pidgin/gtkdialogs.c 0b7926f26dbce961536ab3f5b75cc0f4936a3e1d
+++ pidgin/gtkdialogs.c e26afa19371eb3aa33de365d2ae6dcb730ebefb6
@@ -1288,7 +1288,7 @@ pidgin_dialogs_remove_buddy_cb(PurpleBud
purple_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name);
/* TODO - Should remove from blist first... then call purple_account_remove_buddy()? */
- purple_account_remove_buddy(buddy->account, buddy, group);
+ purple_account_remove_buddy(account, buddy, group);
purple_blist_remove_buddy(buddy);
g_free(name);
============================================================
--- libpurple/protocols/msn/httpconn.c e2d878688a26ac6e0d22bf93825f12aa3e402d4e
+++ libpurple/protocols/msn/httpconn.c 3b5e7ef7d54c4dcb317f1509cb33623067cd40ef
@@ -239,6 +239,9 @@ msn_httpconn_parse_data(MsnHttpConn *htt
}
else
{
+ /* I'll be honest, I don't fully understand all this, but this
+ * causes crashes, Stu. */
+#if 0
MsnServConn *servconn;
/* It's going to die. */
@@ -246,10 +249,9 @@ msn_httpconn_parse_data(MsnHttpConn *htt
servconn = httpconn->servconn;
- /* I'll be honest, I don't fully understand all this, but this
- * causes crashes, Stu. */
- /* if (servconn != NULL)
- servconn->wasted = TRUE; */
+ if (servconn != NULL)
+ servconn->wasted = TRUE;
+#endif
g_free(full_session_id);
g_free(session_id);
============================================================
--- pidgin/gtkstatusbox.c fb0e9d4e9ff3da982a63d598daaa897da6cdb969
+++ pidgin/gtkstatusbox.c 9387b16efae878ce53827e3daad488194f81a277
@@ -657,7 +657,6 @@ pidgin_status_box_refresh(PidginStatusBo
static void
pidgin_status_box_refresh(PidginStatusBox *status_box)
{
- GtkIconSize icon_size;
GtkStyle *style;
char aa_color[8];
PurpleSavedStatus *saved_status;
@@ -668,8 +667,6 @@ pidgin_status_box_refresh(PidginStatusBo
gboolean account_status = FALSE;
PurpleAccount *acct = (status_box->account) ? status_box->account : status_box->token_status_account;
- icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
-
style = gtk_widget_get_style(GTK_WIDGET(status_box));
snprintf(aa_color, sizeof(aa_color), "#%02x%02x%02x",
style->text_aa[GTK_STATE_NORMAL].red >> 8,
@@ -969,12 +966,8 @@ add_popular_statuses(PidginStatusBox *st
PurpleSavedStatus *saved = cur->data;
const gchar *message;
gchar *stripped = NULL;
- PurpleStatusPrimitive prim;
PidginStatusBoxItemType type = PIDGIN_STATUS_BOX_TYPE_POPULAR;
- /* Get an appropriate status icon */
- prim = purple_savedstatus_get_type(saved);
-
if (purple_savedstatus_is_transient(saved))
{
/*
@@ -1074,17 +1067,13 @@ add_account_statuses(PidginStatusBox *st
PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, NULL,
purple_status_type_get_name(status_type),
NULL,
- GINT_TO_POINTER(purple_status_type_get_primitive(status_type)));
+ GINT_TO_POINTER(prim));
}
}
static void
pidgin_status_box_regenerate(PidginStatusBox *status_box, gboolean status_changed)
{
- GtkIconSize icon_size;
-
- icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL);
-
/* Unset the model while clearing it */
gtk_tree_view_set_model(GTK_TREE_VIEW(status_box->tree_view), NULL);
gtk_list_store_clear(status_box->dropdown_store);
============================================================
--- libpurple/protocols/bonjour/bonjour.c 1ea095389d3b9bfac2c562a98b852f9a1da50cea
+++ libpurple/protocols/bonjour/bonjour.c fcdf122a69369c99544f97b892061c53827e787e
@@ -206,18 +206,12 @@ bonjour_set_status(PurpleAccount *accoun
{
PurpleConnection *gc;
BonjourData *bd;
- gboolean disconnected;
- PurpleStatusType *type;
- int primitive;
PurplePresence *presence;
const char *message, *bonjour_status;
gchar *stripped;
gc = purple_account_get_connection(account);
bd = gc->proto_data;
- disconnected = purple_account_is_disconnected(account);
- type = purple_status_get_type(status);
- primitive = purple_status_type_get_primitive(type);
presence = purple_account_get_presence(account);
message = purple_status_get_attr_string(status, "message");
============================================================
--- libpurple/protocols/msn/contact.c 1f2b6e8295569f9ec0ac33fc0ba6ea421b924a3c
+++ libpurple/protocols/msn/contact.c ff5fbd60ae1f205c5a5ca17e467e9c156a150b74
@@ -527,16 +527,20 @@ msn_get_contact_list_cb(MsnSoapMessage *
g_return_if_fail(session != NULL);
if (resp != NULL) {
+#ifdef MSN_PARTIAL_LISTS
const char *abLastChange;
const char *dynamicItemLastChange;
+#endif
purple_debug_misc("msn", "Got the contact list!\n");
msn_parse_contact_list(session, resp->xml);
+#ifdef MSN_PARTIAL_LISTS
abLastChange = purple_account_get_string(session->account,
"ablastChange", NULL);
dynamicItemLastChange = purple_account_get_string(session->account,
"DynamicItemLastChanged", NULL);
+#endif
if (state->partner_scenario == MSN_PS_INITIAL) {
#ifdef MSN_PARTIAL_LISTS
============================================================
--- finch/libgnt/gntentry.c 1879daf21a22bd1a8f02d44952e637813f05c646
+++ finch/libgnt/gntentry.c f4a846770f36359df5a3d25b6df369c1a6310ac5
@@ -481,7 +481,6 @@ history_search(GntBindable *bind, GList
GntEntry *entry = GNT_ENTRY(bind);
GList *iter;
const char *current;
- int len;
if (entry->history->prev && entry->search->needle)
current = entry->search->needle;
@@ -491,8 +490,6 @@ history_search(GntBindable *bind, GList
if (!entry->histlength || !entry->history->next || !*current)
return FALSE;
- len = g_utf8_strlen(current, -1);
-
for (iter = entry->history->next; iter; iter = iter->next) {
const char *str = iter->data;
/* A more utf8-friendly version of strstr would have been better, but
============================================================
--- libpurple/protocols/qq/buddy_info.c dba29efd8c78cc7807f80e46b11aa6fc9b06a0f8
+++ libpurple/protocols/qq/buddy_info.c 7c904b237f4b911b5e545e729776eb5d8661e2df
@@ -224,12 +224,10 @@ void qq_request_buddy_info(PurpleConnect
void qq_request_buddy_info(PurpleConnection *gc, guint32 uid,
guint32 update_class, int action)
{
- qq_data *qd;
gchar raw_data[16] = {0};
g_return_if_fail(uid != 0);
- qd = (qq_data *) gc->proto_data;
g_snprintf(raw_data, sizeof(raw_data), "%u", uid);
qq_send_cmd_mess(gc, QQ_CMD_GET_BUDDY_INFO, (guint8 *) raw_data, strlen(raw_data),
update_class, action);
@@ -271,7 +269,6 @@ static void info_modify_ok_cb(modify_inf
static void info_modify_ok_cb(modify_info_request *info_request, PurpleRequestFields *fields)
{
PurpleConnection *gc;
- qq_data *qd;
gchar **segments;
int index;
const char *utf8_str;
@@ -279,8 +276,7 @@ static void info_modify_ok_cb(modify_inf
int choice_num;
gc = info_request->gc;
- g_return_if_fail(gc != NULL && info_request->gc);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail(gc != NULL);
segments = info_request->segments;
g_return_if_fail(segments != NULL);
@@ -390,14 +386,12 @@ static void info_modify_dialogue(PurpleC
static void info_modify_dialogue(PurpleConnection *gc, gchar **segments, int iclass)
{
- qq_data *qd;
PurpleRequestFieldGroup *group;
PurpleRequestFields *fields;
modify_info_request *info_request;
gchar *utf8_title, *utf8_prim;
int index;
- qd = (qq_data *) gc->proto_data;
/* Keep one dialog once a time */
purple_request_close_with_handle(gc);
@@ -416,9 +410,11 @@ static void info_modify_dialogue(PurpleC
case QQ_FIELD_CONTACT:
utf8_title = g_strdup(_("Modify Contact"));
utf8_prim = g_strdup_printf("%s for %s", _("Modify Contact"), segments[0]);
+ break;
case QQ_FIELD_ADDR:
utf8_title = g_strdup(_("Modify Address"));
utf8_prim = g_strdup_printf("%s for %s", _("Modify Address"), segments[0]);
+ break;
case QQ_FIELD_EXT:
utf8_title = g_strdup(_("Modify Extended Information"));
utf8_prim = g_strdup_printf("%s for %s", _("Modify Extended Information"), segments[0]);
@@ -427,6 +423,7 @@ static void info_modify_dialogue(PurpleC
default:
utf8_title = g_strdup(_("Modify Information"));
utf8_prim = g_strdup_printf("%s for %s", _("Modify Information"), segments[0]);
+ break;
}
info_request = g_new0(modify_info_request, 1);
============================================================
--- libpurple/protocols/qq/buddy_list.c 1ee8e7770fdb8cafa6344dbe64df81bbb0820363
+++ libpurple/protocols/qq/buddy_list.c 732495eed078770e7bcfcc7a5944148b9f1a8f4b
@@ -55,11 +55,9 @@ void qq_request_get_buddies_online(Purpl
/* get a list of online_buddies */
void qq_request_get_buddies_online(PurpleConnection *gc, guint8 position, guint32 update_class)
{
- qq_data *qd;
guint8 *raw_data;
gint bytes = 0;
- qd = (qq_data *) gc->proto_data;
raw_data = g_newa(guint8, 5);
/* 000-000 get online friends cmd
@@ -360,7 +358,6 @@ guint32 qq_process_get_buddies_and_rooms
guint32 qq_process_get_buddies_and_rooms(guint8 *data, gint data_len, PurpleConnection *gc)
{
- qq_data *qd;
gint i, j;
gint bytes;
guint8 sub_cmd, reply_code;
@@ -371,8 +368,6 @@ guint32 qq_process_get_buddies_and_rooms
g_return_val_if_fail(data != NULL && data_len != 0, -1);
- qd = (qq_data *) gc->proto_data;
-
bytes = 0;
bytes += qq_get8(&sub_cmd, data + bytes);
g_return_val_if_fail(sub_cmd == 0x01, -1);
@@ -468,12 +463,7 @@ void qq_request_change_status(PurpleConn
guint8 away_cmd;
guint32 misc_status;
gboolean fake_video;
- PurpleAccount *account;
- PurplePresence *presence;
- account = purple_connection_get_account(gc);
- presence = purple_account_get_presence(account);
-
qd = (qq_data *) gc->proto_data;
if (!qd->is_login)
return;
@@ -596,14 +586,13 @@ void qq_update_buddy_status(PurpleConnec
void qq_update_buddy_status(PurpleConnection *gc, guint32 uid, guint8 status, guint8 flag)
{
gchar *who;
- gchar *status_id;
+ const gchar *status_id;
g_return_if_fail(uid != 0);
/* purple supports signon and idle time
* but it is not much use for QQ, I do not use them */
/* serv_got_update(gc, name, online, 0, q_bud->signon, q_bud->idle, bud->uc); */
- status_id = "available";
switch(status) {
case QQ_BUDDY_OFFLINE:
status_id = "offline";
@@ -677,13 +666,10 @@ void qq_buddy_data_free_all(PurpleConnec
void qq_buddy_data_free_all(PurpleConnection *gc)
{
- qq_data *qd;
PurpleBuddy *buddy;
GSList *buddies, *it;
gint count = 0;
- qd = (qq_data *)purple_connection_get_protocol_data(gc);
-
buddies = purple_find_buddies(purple_connection_get_account(gc), NULL);
for (it = buddies; it; it = it->next) {
qq_buddy_data *qbd = NULL;
============================================================
--- libpurple/protocols/qq/buddy_opt.c 848b326515a6930b8a3ecb514aacaeaaae8ddb82
+++ libpurple/protocols/qq/buddy_opt.c 3e17d546a275b34ad8d2b43ebf34c7997971b8ed
@@ -262,7 +262,6 @@ void qq_process_auth_code(PurpleConnecti
void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
{
- qq_data *qd;
gint bytes;
guint8 cmd, reply;
guint16 sub_cmd;
@@ -272,8 +271,6 @@ void qq_process_auth_code(PurpleConnecti
g_return_if_fail(data != NULL && data_len != 0);
g_return_if_fail(uid != 0);
- qd = (qq_data *) gc->proto_data;
-
qq_show_packet("qq_process_auth_code", data, data_len);
bytes = 0;
bytes += qq_get8(&cmd, data + bytes);
@@ -400,7 +397,6 @@ void qq_process_question(PurpleConnectio
void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
{
- qq_data *qd;
gint bytes;
guint8 cmd, reply;
gchar *question, *answer;
@@ -409,8 +405,6 @@ void qq_process_question(PurpleConnectio
g_return_if_fail(data != NULL && data_len != 0);
- qd = (qq_data *) gc->proto_data;
-
qq_show_packet("qq_process_question", data, data_len);
bytes = 0;
bytes += qq_get8(&cmd, data + bytes);
@@ -720,13 +714,10 @@ void qq_process_add_buddy_auth(guint8 *d
/* process reply to add_buddy_auth request */
void qq_process_add_buddy_auth(guint8 *data, gint data_len, PurpleConnection *gc)
{
- qq_data *qd;
gchar **segments, *msg_utf8;
g_return_if_fail(data != NULL && data_len != 0);
- qd = (qq_data *) gc->proto_data;
-
if (data[0] == '0') {
purple_debug_info("QQ", "Reply OK for sending authorize\n");
return;
@@ -767,11 +758,9 @@ void qq_process_buddy_remove_me(PurpleCo
/* process the server reply for my request to remove myself from a buddy */
void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid)
{
- qq_data *qd;
gchar *msg;
g_return_if_fail(data != NULL && data_len != 0);
- qd = (qq_data *) gc->proto_data;
if (data[0] == 0) {
purple_debug_info("QQ", "Reply OK for removing me from %u's buddy list\n", uid);
@@ -1004,7 +993,6 @@ void qq_process_buddy_check_code(PurpleC
void qq_process_buddy_check_code(PurpleConnection *gc, guint8 *data, gint data_len)
{
- qq_data *qd;
gint bytes;
guint8 cmd;
guint8 reply;
@@ -1013,8 +1001,6 @@ void qq_process_buddy_check_code(PurpleC
g_return_if_fail(data != NULL && data_len >= 5);
- qd = (qq_data *) gc->proto_data;
-
qq_show_packet("buddy_check_code", data, data_len);
bytes = 0;
============================================================
--- libpurple/protocols/qq/file_trans.c 5a226d1d8a0714089ce03befd93eb5d57779c4b7
+++ libpurple/protocols/qq/file_trans.c fc8f019dfef8b322792c89c323b77cadefcf9c68
@@ -238,12 +238,9 @@ static gint _qq_send_file(PurpleConnecti
gint bytes = 0;
guint32 file_key;
qq_data *qd;
- ft_info *info;
qd = (qq_data *) gc->proto_data;
- info = (ft_info *) qd->xfer->data;
-
raw_data = g_newa(guint8, MAX_PACKET_SIZE);
file_key = _gen_file_key();
@@ -805,10 +802,7 @@ void qq_process_recv_file(PurpleConnecti
{
gint bytes;
guint8 tag;
- qq_data *qd;
- qd = (qq_data *) gc->proto_data;
-
bytes = 0;
bytes += qq_get8(&tag, data + bytes);
============================================================
--- libpurple/protocols/qq/group.c 6506e4ef7d48ba885e2395d390aa461cd2b74768
+++ libpurple/protocols/qq/group.c 5d7affefe69ce9df275d3de36f641bf11c25d3dd
@@ -119,13 +119,11 @@ void qq_roomlist_cancel(PurpleRoomlist *
/* free roomlist space, I have no idea when this one is called... */
void qq_roomlist_cancel(PurpleRoomlist *list)
{
- qq_data *qd;
PurpleConnection *gc;
g_return_if_fail(list != NULL);
gc = purple_account_get_connection(list->account);
- qd = (qq_data *) gc->proto_data;
purple_roomlist_set_in_progress(list, FALSE);
purple_roomlist_unref(list);
}
============================================================
--- libpurple/protocols/qq/group_im.c f00128cc0c48fab0d4b39fca942e9c5b00c30c83
+++ libpurple/protocols/qq/group_im.c 170ccd005e23f6f0dd58989de0c2a3c94ee8b2b0
@@ -48,12 +48,10 @@ PurpleConversation *qq_room_conv_open(Pu
PurpleConversation *qq_room_conv_open(PurpleConnection *gc, qq_room_data *rmd)
{
PurpleConversation *conv;
- qq_data *qd;
gchar *topic_utf8;
g_return_val_if_fail(rmd != NULL, NULL);
g_return_val_if_fail(rmd->title_utf8, NULL);
- qd = (qq_data *) gc->proto_data;
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT,
rmd->title_utf8, purple_connection_get_account(gc));
@@ -207,7 +205,6 @@ void qq_process_room_im(guint8 *data, gi
/* recv an IM from a group chat */
void qq_process_room_im(guint8 *data, gint data_len, guint32 id, PurpleConnection *gc, guint16 msg_type)
{
- qq_data *qd;
gchar *msg_smiley, *msg_fmt, *msg_utf8;
gint bytes, tail_len;
struct {
@@ -229,7 +226,6 @@ void qq_process_room_im(guint8 *data, gi
/* at least include im_text.msg_len */
g_return_if_fail(data != NULL && data_len > 23);
- qd = (qq_data *) gc->proto_data;
/* qq_show_packet("ROOM_IM", data, data_len); */
memset(&im_text, 0, sizeof(im_text));
@@ -376,7 +372,6 @@ int qq_chat_send(PurpleConnection *gc, i
gint msg_len;
const gchar *start_invalid;
gboolean is_smiley_none;
- guint8 frag_count, frag_index;
g_return_val_if_fail(NULL != gc && NULL != gc->proto_data, -1);
g_return_val_if_fail(id != 0 && what != NULL, -1);
@@ -386,9 +381,6 @@ int qq_chat_send(PurpleConnection *gc, i
/* qq_show_packet("chat IM UTF8", (guint8 *)what, strlen(what)); */
- fmt = qq_im_fmt_new_by_purple(what);
- is_smiley_none = qq_im_smiley_none(what);
-
msg_stripped = purple_markup_strip_html(what);
g_return_val_if_fail(msg_stripped != NULL, -1);
/* qq_show_packet("IM Stripped", (guint8 *)what, strlen(what)); */
@@ -417,26 +409,10 @@ int qq_chat_send(PurpleConnection *gc, i
qd->send_im_id++;
fmt = qq_im_fmt_new_by_purple(what);
- frag_count = g_slist_length(segments);
- frag_index = 0;
-/*
- if (frag_count <= 1) {
-*/
- for (it = segments; it; it = it->next) {
- request_room_send_im(gc, id, fmt, (gchar *)it->data);
- g_free(it->data);
- }
-/*
- } else {
- for (it = segments; it; it = it->next) {
- request_room_send_im_ex(gc, id, fmt, (gchar *)it->data,
- qd->send_im_id, frag_count, frag_index);
- g_free(it->data);
- frag_index++;
- }
+ for (it = segments; it; it = g_slist_delete_link(it, it)) {
+ request_room_send_im(gc, id, fmt, (gchar *)it->data);
+ g_free(it->data);
}
-*/
qq_im_fmt_free(fmt);
- g_slist_free(segments);
return 1;
}
============================================================
--- libpurple/protocols/qq/group_join.c 66b970ee2176b4f78d2d29245e55095e8341a3ab
+++ libpurple/protocols/qq/group_join.c 4d84b6d78768504dc8c6387efd56cc0151616d55
@@ -178,12 +178,10 @@ void qq_process_group_cmd_exit_group(gui
/* If comes here, cmd is OK already */
void qq_process_group_cmd_exit_group(guint8 *data, gint len, PurpleConnection *gc)
{
- qq_data *qd;
gint bytes;
guint32 id;
g_return_if_fail(data != NULL && len > 0);
- qd = (qq_data *) gc->proto_data;
if (len < 4) {
purple_debug_error("QQ", "Invalid exit group reply, expect %d bytes, read %d bytes\n", 4, len);
@@ -201,12 +199,10 @@ void qq_process_group_cmd_join_group_aut
{
gint bytes;
guint32 id;
- qq_data *qd;
qq_room_data *rmd;
gchar *msg;
g_return_if_fail(data != NULL && len > 0);
- qd = (qq_data *) gc->proto_data;
if (len < 4) {
purple_debug_error("QQ",
@@ -283,7 +279,6 @@ void qq_group_join(PurpleConnection *gc,
/* Attempt to join a group without auth */
void qq_group_join(PurpleConnection *gc, GHashTable *data)
{
- qq_data *qd;
gchar *ext_id_str;
gchar *id_str;
guint32 ext_id;
@@ -291,7 +286,6 @@ void qq_group_join(PurpleConnection *gc,
qq_room_data *rmd;
g_return_if_fail(data != NULL);
- qd = (qq_data *) gc->proto_data;
ext_id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_EXTERNAL_ID);
id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_INTERNAL_ID);
============================================================
--- libpurple/protocols/qq/group_opt.c 3c9fe02071a3a178b36d91390b6e2135452f5cf6
+++ libpurple/protocols/qq/group_opt.c 3f1aa931d61c830b0e1c49581bb6347f638e463f
@@ -134,12 +134,10 @@ void qq_group_modify_members(PurpleConne
{
guint32 *old_members, *del_members, *add_members;
qq_buddy_data *bd;
- qq_data *qd;
gint i = 0, old = 0, new = 0, del = 0, add = 0;
GList *list;
g_return_if_fail(rmd != NULL);
- qd = (qq_data *) gc->proto_data;
if (new_members[0] == 0xffffffff)
return;
============================================================
--- libpurple/protocols/qq/im.c 4b015db88274e77a8ae119fc4b2ee04b37b12f4c
+++ libpurple/protocols/qq/im.c 99d2868d5c8b67ab905ad128d0603f71af8bba50
@@ -725,7 +725,6 @@ static void process_im_text(PurpleConnec
/* process received normal text IM */
static void process_im_text(PurpleConnection *gc, guint8 *data, gint len, qq_im_header *im_header)
{
- qq_data *qd;
guint16 purple_msg_type;
gchar *who;
gchar *msg_smiley, *msg_fmt, *msg_utf8;
@@ -749,10 +748,9 @@ static void process_im_text(PurpleConnec
gchar *msg; /* no fixed length, ends with 0x00 */
} im_text;
- g_return_if_fail (data != NULL && len > 0);
+ g_return_if_fail(data != NULL && len > 0);
g_return_if_fail(im_header != NULL);
- qd = (qq_data *) gc->proto_data;
memset(&im_text, 0, sizeof(im_text));
/* qq_show_packet("IM text", data, len); */
@@ -823,7 +821,6 @@ static void process_extend_im_text(Purpl
/* process received extended (2007) text IM */
static void process_extend_im_text(PurpleConnection *gc, guint8 *data, gint len, qq_im_header *im_header)
{
- qq_data *qd;
guint16 purple_msg_type;
gchar *who;
gchar *msg_smiley, *msg_fmt, *msg_utf8;
@@ -848,10 +845,9 @@ static void process_extend_im_text(Purpl
guint8 fromMobileQQ;
} im_text;
- g_return_if_fail (data != NULL && len > 0);
+ g_return_if_fail(data != NULL && len > 0);
g_return_if_fail(im_header != NULL);
- qd = (qq_data *) gc->proto_data;
memset(&im_text, 0, sizeof(im_text));
/* qq_show_packet("Extend IM text", data, len); */
@@ -1043,12 +1039,10 @@ static void request_send_im(PurpleConnec
{
qq_data *qd;
guint8 raw_data[MAX_PACKET_SIZE - 16];
- guint16 im_type;
gint bytes;
time_t now;
qd = (qq_data *) gc->proto_data;
- im_type = QQ_NORMAL_IM_TEXT;
/* purple_debug_info("QQ", "Send IM %d-%d\n", frag_count, frag_index); */
bytes = 0;
@@ -1118,13 +1112,12 @@ GSList *qq_im_get_segments(gchar *msg_st
GString *new_string;
GString *append_utf8;
gchar *start, *p;
- gint count, len;
+ gint len;
qq_emoticon *emoticon;
g_return_val_if_fail(msg_stripped != NULL, NULL);
start = msg_stripped;
- count = 0;
new_string = g_string_new("");
append_utf8 = g_string_new("");
while (*start) {
============================================================
--- libpurple/protocols/qq/qq.c eb0eac3d583fae3befa15b4a160a33c9f755eb29
+++ libpurple/protocols/qq/qq.c 74353a971feb3ad8664c10cfbdab988cf63902e5
@@ -89,15 +89,12 @@ static void server_list_create(PurpleAcc
{
PurpleConnection *gc;
qq_data *qd;
- PurpleProxyInfo *gpi;
const gchar *custom_server;
gc = purple_account_get_connection(account);
g_return_if_fail(gc != NULL && gc->proto_data != NULL);
qd = gc->proto_data;
- gpi = purple_proxy_get_setup(account);
-
qd->use_tcp = purple_account_get_bool(account, "use_tcp", TRUE);
custom_server = purple_account_get_string(account, "server", NULL);
@@ -617,12 +614,10 @@ static void action_about_openq(PurplePlu
static void action_about_openq(PurplePluginAction *action)
{
PurpleConnection *gc = (PurpleConnection *) action->context;
- qq_data *qd;
GString *info;
gchar *title;
- g_return_if_fail(NULL != gc && NULL != gc->proto_data);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail(NULL != gc);
info = g_string_new("<html><body>");
g_string_append(info, _("<p><b>Original Author</b>:<br>\n"));
============================================================
--- libpurple/protocols/qq/send_file.c 599895ab8b186c9fe2b3c3476b48eca504bd7a01
+++ libpurple/protocols/qq/send_file.c a22ab6c390ed532a96777880f8cd0f96481d7b08
@@ -637,10 +637,8 @@ static void _qq_xfer_cancel(PurpleXfer *
{
PurpleConnection *gc;
PurpleAccount *account;
- guint16 *seq;
g_return_if_fail (xfer != NULL);
- seq = (guint16 *) xfer->data;
account = purple_xfer_get_account(xfer);
gc = purple_account_get_connection(account);
@@ -670,10 +668,8 @@ static void _qq_xfer_recv_init(PurpleXfe
{
PurpleConnection *gc;
PurpleAccount *account;
- ft_info *info;
- g_return_if_fail (xfer != NULL && xfer->data != NULL);
- info = (ft_info *) xfer->data;
+ g_return_if_fail(xfer != NULL);
account = purple_xfer_get_account(xfer);
gc = purple_account_get_connection(account);
@@ -752,7 +748,7 @@ void qq_process_recv_file_accept(guint8
g_return_if_fail (data != NULL && data_len != 0);
qd = (qq_data *) gc->proto_data;
xfer = qd->xfer;
- info = (ft_info *) qd->xfer->data;
+ info = (ft_info *) xfer->data;
if (data_len <= 30 + QQ_CONN_INFO_LEN) {
purple_debug_warning("QQ", "Received file reject message is empty\n");
@@ -761,7 +757,7 @@ void qq_process_recv_file_accept(guint8
bytes = 18 + 12; /* skip 30 bytes */
qq_get_conn_info(info, data + bytes);
- _qq_xfer_init_socket(qd->xfer);
+ _qq_xfer_init_socket(xfer);
_qq_xfer_init_udp_channel(info);
_qq_send_packet_file_notifyip(gc, sender_uid);
============================================================
--- finch/gntft.c cc09909ffa63044a00c93bac8fe03b9b92e3f0f6
+++ finch/gntft.c 203abd8edb065582713eca2052040dae8f8be16b
@@ -383,8 +383,6 @@ finch_xfer_dialog_cancel_xfer(PurpleXfer
return;
}
- data = FINCHXFER(xfer);
-
update_title_progress();
if (purple_xfer_is_canceled(xfer))
@@ -402,7 +400,7 @@ finch_xfer_dialog_update_xfer(PurpleXfer
char *size_str, *remaining_str;
time_t current_time;
char prog_str[5];
- double kb_sent, kb_rem;
+ double kb_sent;
double kbps = 0.0;
time_t elapsed, now;
char *kbsec;
@@ -412,7 +410,6 @@ finch_xfer_dialog_update_xfer(PurpleXfer
now = time(NULL);
kb_sent = purple_xfer_get_bytes_sent(xfer) / 1024.0;
- kb_rem = purple_xfer_get_bytes_remaining(xfer) / 1024.0;
elapsed = (purple_xfer_get_start_time(xfer) > 0 ? now - purple_xfer_get_start_time(xfer) : 0);
kbps = (elapsed > 0 ? (kb_sent / elapsed) : 0);
============================================================
--- pidgin/gtksmiley.c 137c349073609dfa0bc2a1ebd4ebc0a571a41a83
+++ pidgin/gtksmiley.c fee12e52708f755bfcf70b9641094162b4b5dee3
@@ -520,10 +520,7 @@ static void delete_foreach(GtkTreeModel
GtkTreeIter *iter, gpointer data)
{
PurpleSmiley *smiley = NULL;
- SmileyManager *dialog;
- dialog = (SmileyManager*)data;
-
gtk_tree_model_get(model, iter,
SMILEY, &smiley,
-1);
============================================================
--- libpurple/protocols/qq/qq_network.c d49f20c9c919b84db74bf7bdd980e0ca77d9f1e5
+++ libpurple/protocols/qq/qq_network.c 8a50082efce52017e0fbe5846bb55a1b001b9049
@@ -482,13 +482,11 @@ static void udp_pending(gpointer data, g
static void udp_pending(gpointer data, gint source, PurpleInputCondition cond)
{
PurpleConnection *gc = NULL;
- qq_data *qd;
guint8 *buf;
gint buf_len;
gc = (PurpleConnection *) data;
- g_return_if_fail(gc != NULL && gc->proto_data != NULL);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail(gc != NULL);
if(cond != PURPLE_INPUT_READ) {
purple_connection_error_reason(gc,
@@ -748,14 +746,12 @@ static void connect_cb(gpointer data, gi
{
PurpleConnection *gc;
qq_data *qd;
- PurpleAccount *account ;
qq_connection *conn;
gc = (PurpleConnection *) data;
g_return_if_fail(gc != NULL && gc->proto_data != NULL);
qd = (qq_data *) gc->proto_data;
- account = purple_connection_get_account(gc);
/* conn_data will be destoryed */
qd->conn_data = NULL;
============================================================
--- libpurple/protocols/qq/qq_trans.c 98eeaef56ad19b708ae9aa57dc0710d6487a26a0
+++ libpurple/protocols/qq/qq_trans.c 127f41ef02bce27e2fdae67a817655385538ead0
@@ -109,11 +109,9 @@ static qq_transaction *trans_create(Purp
static qq_transaction *trans_create(PurpleConnection *gc, gint fd,
guint16 cmd, guint16 seq, guint8 *data, gint data_len, guint32 update_class, guint32 ship32)
{
- qq_data *qd;
qq_transaction *trans;
- g_return_val_if_fail(gc != NULL && gc->proto_data != NULL, NULL);
- qd = (qq_data *) gc->proto_data;
+ g_return_val_if_fail(gc != NULL, NULL);
trans = g_new0(qq_transaction, 1);
============================================================
--- libpurple/protocols/qq/qq_base.c d375832b25bf0e77490750027b80f1321a95957a
+++ libpurple/protocols/qq/qq_base.c c3e3337837bcc870fed5986634889fb9f017cd8b
@@ -386,7 +386,6 @@ guint8 qq_process_login( PurpleConnectio
/* process the login reply packet */
guint8 qq_process_login( PurpleConnection *gc, guint8 *data, gint data_len)
{
- qq_data *qd;
guint8 ret = data[0];
gchar *msg, *msg_utf8;
gchar *error;
@@ -394,8 +393,6 @@ guint8 qq_process_login( PurpleConnectio
g_return_val_if_fail(data != NULL && data_len != 0, QQ_LOGIN_REPLY_ERR);
- qd = (qq_data *) gc->proto_data;
-
switch (ret) {
case QQ_LOGIN_REPLY_OK:
purple_debug_info("QQ", "Login OK\n");
============================================================
--- libpurple/protocols/qq/qq_process.c 4503b858f8671cd630ff35226bd50dd01215b907
+++ libpurple/protocols/qq/qq_process.c e4e405cfcfb9f510077b1b0b0d7a399922f928d8
@@ -58,15 +58,12 @@ static void process_unknow_cmd(PurpleCon
/* default process, decrypt and dump */
static void process_unknow_cmd(PurpleConnection *gc,const gchar *title, guint8 *data, gint data_len, guint16 cmd, guint16 seq)
{
- qq_data *qd;
gchar *msg;
g_return_if_fail(data != NULL && data_len != 0);
qq_show_packet(title, data, data_len);
- qd = (qq_data *) gc->proto_data;
-
qq_hex_dump(PURPLE_DEBUG_WARNING, "QQ",
data, data_len,
">>> [%d] %s -> [default] decrypt and dump",
@@ -80,12 +77,8 @@ static void do_im_ack(guint8 *data, gint
/* parse the reply to send_im */
static void do_im_ack(guint8 *data, gint data_len, PurpleConnection *gc)
{
- qq_data *qd;
-
g_return_if_fail(data != NULL && data_len != 0);
- qd = gc->proto_data;
-
if (data[0] != 0) {
purple_debug_warning("QQ", "Failed sent IM\n");
purple_notify_error(gc, _("Error"), _("Unable to send message."), NULL);
@@ -380,15 +373,12 @@ static void request_server_ack(PurpleCon
/* Send ACK if the sys message needs an ACK */
static void request_server_ack(PurpleConnection *gc, gchar *funct_str, gchar *from, guint16 seq)
{
- qq_data *qd;
guint8 *raw_data;
gint bytes;
guint8 bar;
g_return_if_fail(funct_str != NULL && from != NULL);
- qd = (qq_data *) gc->proto_data;
-
bar = 0x1e;
raw_data = g_newa(guint8, strlen(funct_str) + strlen(from) + 16);
@@ -568,11 +558,9 @@ void qq_update_room(PurpleConnection *gc
void qq_update_room(PurpleConnection *gc, guint8 room_cmd, guint32 room_id)
{
- qq_data *qd;
gint ret;
- g_return_if_fail (gc != NULL && gc->proto_data != NULL);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail (gc != NULL);
switch (room_cmd) {
case 0:
@@ -599,12 +587,10 @@ void qq_update_all_rooms(PurpleConnectio
void qq_update_all_rooms(PurpleConnection *gc, guint8 room_cmd, guint32 room_id)
{
- qq_data *qd;
gboolean is_new_turn = FALSE;
guint32 next_id;
- g_return_if_fail (gc != NULL && gc->proto_data != NULL);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail(gc != NULL);
next_id = qq_room_get_next(gc, room_id);
purple_debug_info("QQ", "Update rooms, next id %u, prev id %u\n", next_id, room_id);
@@ -689,11 +675,9 @@ static void update_all_rooms_online(Purp
static void update_all_rooms_online(PurpleConnection *gc, guint8 room_cmd, guint32 room_id)
{
- qq_data *qd;
guint32 next_id;
- g_return_if_fail (gc != NULL && gc->proto_data != NULL);
- qd = (qq_data *) gc->proto_data;
+ g_return_if_fail (gc != NULL);
next_id = qq_room_get_next_conv(gc, room_id);
if (next_id <= 0 && room_id <= 0) {
============================================================
--- libpurple/protocols/jabber/jingle/transport.c 76b59aa414c75e95bfa1c16f9526b848706e4970
+++ libpurple/protocols/jabber/jingle/transport.c 4994e70d5daad7157ec1b79158c8b6bd2eed8a7a
@@ -111,8 +111,6 @@ jingle_transport_set_property (GObject *
JingleTransport *transport;
g_return_if_fail(JINGLE_IS_TRANSPORT(object));
- transport = JINGLE_TRANSPORT(object);
-
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -125,8 +123,6 @@ jingle_transport_get_property (GObject *
{
JingleTransport *transport;
g_return_if_fail(JINGLE_IS_TRANSPORT(object));
-
- transport = JINGLE_TRANSPORT(object);
switch (prop_id) {
default:
============================================================
--- libpurple/media/backend-fs2.c 26c5321f0f6410d5bfc8b57bf79a403df9a0ab64
+++ libpurple/media/backend-fs2.c 790581c1f3233eb3b5419a853ce2ae5f1486216f
@@ -1837,15 +1837,12 @@ purple_media_backend_fs2_get_codecs(Purp
purple_media_backend_fs2_get_codecs(PurpleMediaBackend *self,
const gchar *sess_id)
{
- PurpleMediaBackendFs2Private *priv;
PurpleMediaBackendFs2Session *session;
GList *fscodecs;
GList *codecs;
g_return_val_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(self), NULL);
- priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(self);
-
session = get_session(PURPLE_MEDIA_BACKEND_FS2(self), sess_id);
if (session == NULL)
@@ -2014,13 +2011,10 @@ purple_media_backend_fs2_set_output_volu
const gchar *sess_id, const gchar *who, double level)
{
#ifdef USE_VV
- PurpleMediaBackendFs2Private *priv;
GList *streams;
g_return_if_fail(PURPLE_IS_MEDIA_BACKEND_FS2(self));
- priv = PURPLE_MEDIA_BACKEND_FS2_GET_PRIVATE(self);
-
purple_prefs_set_int("/purple/media/audio/volume/output", level);
streams = get_streams(self, sess_id, who);
More information about the Commits
mailing list