diff options
author | Eion Robb <eion@robbmob.com> | 2010-10-06 08:40:40 +0400 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2010-10-06 08:40:40 +0400 |
commit | 5cd317b3c19091d01dc6d0427440c637dc2a122a (patch) | |
tree | 0771bf6c5ca4c3361207c6e7a8f9ba90e650c522 | |
parent | a7072b60af3992b752a13bb6dac276dd8bccc632 (diff) |
Remove 'buddy exists on buddy list' check in add_buddy to prevent a thread race
-rw-r--r-- | libskype.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -2415,11 +2415,8 @@ void skype_remove_group(PurpleConnection *gc, PurpleGroup *group) void skype_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) { - //Check that the buddy isn't already on the buddy list - if (!purple_find_buddy(buddy->account, buddy->name)) - { - skype_send_message_nowait("SET USER %s BUDDYSTATUS 2 %s", buddy->name, _("Please authorize me so I can add you to my buddy list.")); - } + skype_send_message_nowait("SET USER %s BUDDYSTATUS 2 %s", buddy->name, _("Please authorize me so I can add you to my buddy list.")); + if (buddy->alias == NULL || strlen(buddy->alias) == 0) skype_update_buddy_alias(buddy); else |