[Pidgin] #4696: Wrong attrs on old_status in buddy-status-changed signal

Pidgin trac at pidgin.im
Sun Jan 20 18:04:05 EST 2008


#4696: Wrong attrs on old_status in buddy-status-changed signal
------------------------+---------------------------------------------------
 Reporter:  shreevatsa  |       Type:  defect
   Status:  new         |   Priority:  minor 
Component:  libpurple   |    Version:  2.3.1 
 Keywords:              |    Pending:  0     
------------------------+---------------------------------------------------
 From the `buddy-status-changed` signal `(buddy, old_status, status)`, one
 can try to get the old status message using
 `purple_status_get_attr_string(old_status, "message")`, but what is got is
 actually the '''new''' status message.

 What seems to be happening:

 The buddy-status-changed signal is emitted by
 `purple_blist_update_buddy_status(PurpleBuddy *buddy, PurpleStatus
 *old_status)` in blist.c:757, which is called from
 `purple_prpl_got_user_status` in prpl.c:235. In this function, the
 `old_status` from line 262 has the right attrs, but the
 `purple_status_set_active_with_attrs` a couple of lines later overwrites
 them, so that the `old_status` passed to
 `purple_blist_update_buddy_status` another couple of lines later actually
 has the wrong attributes.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4696>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list