Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/user.c @ 31118:690bd42ce0ea
Endpoint names are case-insensitive, so put the id in lowercase always.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Tue, 15 Dec 2009 01:22:59 +0000 |
parents | 43cf75e21702 |
children | fee2d38d14bd |
comparison
equal
deleted
inserted
replaced
31117:ccae0fa9622f | 31118:690bd42ce0ea |
---|---|
245 g_free(data->id); | 245 g_free(data->id); |
246 g_free(data); | 246 g_free(data); |
247 } | 247 } |
248 | 248 |
249 void | 249 void |
250 msn_user_set_endpoint_data(MsnUser *user, const char *endpoint, MsnUserEndpoint *data) | 250 msn_user_set_endpoint_data(MsnUser *user, const char *input, MsnUserEndpoint *data) |
251 { | 251 { |
252 MsnUserEndpoint *new; | 252 MsnUserEndpoint *new; |
253 g_return_if_fail(user != NULL); | 253 char *endpoint; |
254 | |
255 g_return_if_fail(user != NULL); | |
256 g_return_if_fail(input != NULL); | |
257 | |
258 endpoint = g_ascii_strdown(input, -1); | |
254 | 259 |
255 if (data == NULL) { | 260 if (data == NULL) { |
256 g_hash_table_remove(user->endpoints, endpoint); | 261 g_hash_table_remove(user->endpoints, endpoint); |
262 g_free(endpoint); | |
257 return; | 263 return; |
258 } | 264 } |
259 | 265 |
260 new = g_hash_table_lookup(user->endpoints, endpoint); | 266 new = g_hash_table_lookup(user->endpoints, endpoint); |
261 if (!new) { | 267 if (!new) { |
264 g_hash_table_insert(user->endpoints, g_strdup(endpoint), new); | 270 g_hash_table_insert(user->endpoints, g_strdup(endpoint), new); |
265 } | 271 } |
266 | 272 |
267 new->clientid = data->clientid; | 273 new->clientid = data->clientid; |
268 new->extcaps = data->extcaps; | 274 new->extcaps = data->extcaps; |
275 | |
276 g_free(endpoint); | |
269 } | 277 } |
270 | 278 |
271 void | 279 void |
272 msn_user_set_op(MsnUser *user, int list_op) | 280 msn_user_set_op(MsnUser *user, int list_op) |
273 { | 281 { |