im.pidgin.pidgin: 48faf08abe024b6ad491a1145e309b36fceda249
nosnilmot at pidgin.im
nosnilmot at pidgin.im
Tue Nov 27 20:40:39 EST 2007
-----------------------------------------------------------------
Revision: 48faf08abe024b6ad491a1145e309b36fceda249
Ancestor: f5e03381162836652532f1495162df4868b7b8cb
Author: nosnilmot at pidgin.im
Date: 2007-11-28T01:31:36
Branch: im.pidgin.pidgin
Modified files:
libpurple/protocols/msnp9/user.c
ChangeLog:
Prevent exceeding the server limit on friendly name length when setting
buddies friendly names on the server. This should fix at least some (if not
all) of the new "Can't connect to MSN OMGWTFBBQ!" problems reported for 2.3.0
-------------- next part --------------
============================================================
--- libpurple/protocols/msnp9/user.c b166fe2436a48a3a6ddabeaa6491a1daba57b6c5
+++ libpurple/protocols/msnp9/user.c d5fa240d020a6f90aecb2b07a3bf4ce1a2116e5e
@@ -126,16 +126,19 @@ msn_user_set_friendly_name(MsnUser *user
msn_user_set_friendly_name(MsnUser *user, const char *name)
{
MsnCmdProc *cmdproc;
+ const char *encoded;
g_return_if_fail(user != NULL);
- if (user->friendly_name && strcmp(user->friendly_name, name)) {
+ encoded = purple_url_encode(name);
+
+ if (user->friendly_name && strcmp(user->friendly_name, name) && (strlen(encoded) < 387)) {
/* copy the new name to the server list, but only when new */
/* should we check this more thoroughly? */
cmdproc = user->userlist->session->notification->cmdproc;
msn_cmdproc_send(cmdproc, "REA", "%s %s",
user->passport,
- purple_url_encode(name));
+ encoded);
}
g_free(user->friendly_name);
More information about the Commits
mailing list