Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo_aliases.c @ 20336:b93e7be3847b
applied changes from 9d35dde0c779cca73548172223ba557f27d61882
through cd26f6af7f8ee75ef909ae08b06ad5a1978051d9
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 20 Oct 2007 15:57:22 +0000 |
parents | 0484c20b138a |
children | 32e3d45aa1b2 |
comparison
equal
deleted
inserted
replaced
20335:5defb0546059 | 20336:b93e7be3847b |
---|---|
115 | 115 |
116 /* Finally, if we received an alias, we better update the buddy list */ | 116 /* Finally, if we received an alias, we better update the buddy list */ |
117 if (alias != NULL) { | 117 if (alias != NULL) { |
118 serv_got_alias(cb->gc, yid, alias); | 118 serv_got_alias(cb->gc, yid, alias); |
119 purple_debug_info("yahoo","Fetched alias '%s' (%s)\n",alias,id); | 119 purple_debug_info("yahoo","Fetched alias '%s' (%s)\n",alias,id); |
120 } else if (g_strcasecmp((alias!=NULL?alias:""),(b->alias!=NULL?b->alias:"")) != 0) { | 120 } else if (b->alias != alias && strcmp(b->alias, "") != 0) { |
121 /* Or if we have an alias that Yahoo doesn't, send it up */ | 121 /* Or if we have an alias that Yahoo doesn't, send it up */ |
122 yahoo_update_alias(cb->gc, yid, b->alias); | 122 yahoo_update_alias(cb->gc, yid, b->alias); |
123 purple_debug_info("yahoo","Sent alias '%s'\n", b->alias); | 123 purple_debug_info("yahoo","Sent alias '%s'\n", b->alias); |
124 } | 124 } |
125 } else { | 125 } else { |
214 char *content, *url, *request, *webpage, *webaddress, *strtmp; | 214 char *content, *url, *request, *webpage, *webaddress, *strtmp; |
215 int inttmp; | 215 int inttmp; |
216 struct callback_data *cb; | 216 struct callback_data *cb; |
217 PurpleBuddy *buddy; | 217 PurpleBuddy *buddy; |
218 PurpleUtilFetchUrlData *url_data; | 218 PurpleUtilFetchUrlData *url_data; |
219 | 219 |
220 g_return_if_fail(alias!= NULL); | 220 g_return_if_fail(alias!= NULL); |
221 g_return_if_fail(who!=NULL); | 221 g_return_if_fail(who!=NULL); |
222 g_return_if_fail(gc!=NULL); | 222 g_return_if_fail(gc!=NULL); |
223 | 223 |
224 purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); | 224 purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); |
225 | 225 |
226 buddy = purple_find_buddy(gc->account, who); | 226 buddy = purple_find_buddy(gc->account, who); |
227 if (buddy->proto_data == NULL) { | 227 if (buddy == NULL || buddy->proto_data == NULL) { |
228 purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n"); | 228 purple_debug_info("yahoo", "Missing proto_data (get_yahoo_aliases must have failed), bailing out\n"); |
229 return; | 229 return; |
230 } | 230 } |
231 | 231 |
232 yd = gc->proto_data; | 232 yd = gc->proto_data; |