Mercurial > pidgin
comparison src/protocols/msn/msn.c @ 7469:603a58cd23dc
[gaim-migrate @ 8082]
This should fix the problem where some MSN users in the buddy list were
showing the offline emblem, indicating that gaim and the server disagree as
to whether or not the buddy should be there. That icon was for testing
purposes, and should never have been seen by a user. The problem was that
in the code, we were looking for a list of all buddies, and would add new
ones if not found. The problem was that we'd get duplicates, as some would
be in foo@bar.com form, and some in FOO@bar.com form, or mixed-case, or
whatever. Now, our msn_normalize() converts a string to lowercase first.
We'll see how well this works, but it fixed the problem here.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 10 Nov 2003 22:13:18 +0000 |
parents | ab828b8c3f22 |
children | cb9c3b6d6de9 |
comparison
equal
deleted
inserted
replaced
7468:4ab8ec97576c | 7469:603a58cd23dc |
---|---|
1208 | 1208 |
1209 static const char * | 1209 static const char * |
1210 msn_normalize(const GaimAccount *account, const char *str) | 1210 msn_normalize(const GaimAccount *account, const char *str) |
1211 { | 1211 { |
1212 static char buf[BUF_LEN]; | 1212 static char buf[BUF_LEN]; |
1213 char *tmp; | |
1213 | 1214 |
1214 g_return_val_if_fail(str != NULL, NULL); | 1215 g_return_val_if_fail(str != NULL, NULL); |
1215 | 1216 |
1216 g_snprintf(buf, sizeof(buf), "%s%s", str, | 1217 g_snprintf(buf, sizeof(buf), "%s%s", str, |
1217 (strchr(str, '@') ? "" : "@hotmail.com")); | 1218 (strchr(str, '@') ? "" : "@hotmail.com")); |
1219 | |
1220 tmp = g_utf8_strdown(buf, -1); | |
1221 strncpy(buf, tmp, sizeof(buf)); | |
1222 g_free(tmp); | |
1218 | 1223 |
1219 return buf; | 1224 return buf; |
1220 } | 1225 } |
1221 | 1226 |
1222 static void | 1227 static void |