Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2010-10-06 08:40:40 +0400
committerEion Robb <eion@robbmob.com>2010-10-06 08:40:40 +0400
commit5cd317b3c19091d01dc6d0427440c637dc2a122a (patch)
tree0771bf6c5ca4c3361207c6e7a8f9ba90e650c522
parenta7072b60af3992b752a13bb6dac276dd8bccc632 (diff)
Remove 'buddy exists on buddy list' check in add_buddy to prevent a thread race
-rw-r--r--libskype.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libskype.c b/libskype.c
index 4d8e32f..91b41cf 100644
--- a/libskype.c
+++ b/libskype.c
@@ -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