Don't duplicate contacts in the demo protocol when reconnecting

Review Request #2436 — Created April 12, 2023 and submitted

Information

pidgin/pidgin
default

Reviewers

Previously, we were always creating new contacts and persons on connection. This
ends up with duplicates when we run the connection error actions which is
obviously not what we want.

Ran the connection error actions and verified that we did not get duplicate contacts and persons.

Summary ID
Don't duplicate contacts in the demo protocol when reconnecting
Perviously we were always creating new contacts and persons on connection. This ends up with duplicates when we run the connection error actions which is obviously not what we want.
daafd9a2402b1b89bac760cecd2d1210a67afea5
Description From Last Updated

contact leaks if it's not new.

QuLogicQuLogic

Actually, I think the purple_contact_manager_add annotation might be wrong and it leaks in both cases.

QuLogicQuLogic
QuLogic
QuLogic
  1. 
      
  2. libpurple/protocols/demo/purpledemocontacts.c (Diff revision 1)
     
     
     
     
     
    Show all issues

    contact leaks if it's not new.

  3. Show all issues

    Actually, I think the purple_contact_manager_add annotation might be wrong and it leaks in both cases.

    1. Oh, it's not wrong; it says transfer none, so this side leaks too.

  4. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed