Mercurial > pidgin.yaz
changeset 4705:e34fe984f999
[gaim-migrate @ 5016]
believe it or not, we do work on things besides the buddy list ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 11 Mar 2003 18:15:36 +0000 |
parents | 56c70997fe5c |
children | ca87e6492319 |
files | src/protocols/gg/gg.c src/protocols/jabber/jabber.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c |
diffstat | 4 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/gg/gg.c Tue Mar 11 17:40:11 2003 +0000 +++ b/src/protocols/gg/gg.c Tue Mar 11 18:15:36 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 5001 2003-03-10 06:22:44Z faceprint $ + * $Id: gg.c 5016 2003-03-11 18:15:36Z faceprint $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -1028,7 +1028,7 @@ /* GG Number */ gchar *name = gg_urlencode(b->name); /* GG Pseudo */ - gchar *show = gg_urlencode(b->alias[0] ? b->alias : b->name); + gchar *show = gg_urlencode(b->alias ? b->alias : b->name); /* Group Name */ gchar *gname = gg_urlencode(g->name);
--- a/src/protocols/jabber/jabber.c Tue Mar 11 17:40:11 2003 +0000 +++ b/src/protocols/jabber/jabber.c Tue Mar 11 18:15:36 2003 +0000 @@ -1743,6 +1743,7 @@ if((buddyname = get_realwho(gjc, who, FALSE, &gjid)) == NULL) return; + /* JFIXME: jabber_handleroster() had a "FIXME: transport" at this * equivilent point. So... * @@ -1765,7 +1766,7 @@ */ if (BUD_SUB_TO_PEND(sub, ask) || BUD_SUBD_TO(sub, ask)) { if ((b = gaim_find_buddy(GJ_GC(gjc)->account, buddyname)) == NULL) { - struct buddy *b = gaim_buddy_new(GJ_GC(gjc)->account, buddyname, name ? name : NULL); + struct buddy *b = gaim_buddy_new(GJ_GC(gjc)->account, buddyname, name); struct group *g; if (groupname) { if (!(g = gaim_find_group(groupname))) @@ -1791,7 +1792,7 @@ * seems rude, but it seems to be the only way... */ gaim_blist_remove_buddy(b); - b = gaim_buddy_new(GJ_GC(gjc)->account, buddyname, name ? name : NULL); + b = gaim_buddy_new(GJ_GC(gjc)->account, buddyname, name); gaim_blist_add_buddy(b, gaim_find_group(groupname), NULL); gaim_blist_save(); if(present) { @@ -1799,7 +1800,8 @@ uc, 0); } } else if(name != NULL && strcmp(b->alias, name)) { - g_snprintf(b->alias, sizeof(b->alias), "%s", name); + g_free(b->alias); + b->alias = g_strdup(name); gaim_blist_rename_buddy(b, buddyname); gaim_blist_save(); } @@ -2500,7 +2502,7 @@ */ if(alias && alias[0] != '\0') { my_alias = alias; - } else if(buddy && buddy->alias[0]) { + } else if(buddy && buddy->alias) { my_alias = buddy->alias; }
--- a/src/protocols/oscar/oscar.c Tue Mar 11 17:40:11 2003 +0000 +++ b/src/protocols/oscar/oscar.c Tue Mar 11 18:15:36 2003 +0000 @@ -4328,8 +4328,10 @@ free(alias); if (buddy) { /* Get server stored alias */ - if (alias_utf8) - strcpy(buddy->alias, alias_utf8); + if (alias_utf8) { + g_free(buddy->alias); + buddy->alias = g_strdup(alias_utf8); + } } else { struct group *g; buddy = gaim_buddy_new(gc->account, curitem->name, alias_utf8);
--- a/src/protocols/toc/toc.c Tue Mar 11 17:40:11 2003 +0000 +++ b/src/protocols/toc/toc.c Tue Mar 11 18:15:36 2003 +0000 @@ -289,8 +289,8 @@ b = (struct buddy *)mem->data; if(b->account == account) { pos += g_snprintf(&s[pos], len - pos, "b %s%s%s\n", b->name, - (show && b->alias[0]) ? ":" : "", - (show && b->alias[0]) ? b->alias : ""); + (show && b->alias) ? ":" : "", + (show && b->alias) ? b->alias : ""); } mem = mem->next; }