Mercurial > pidgin
diff libpurple/protocols/myspace/user.c @ 25983:9ea3474065dc
propagate from branch 'im.pidgin.pidgin' (head 303af74a38e7b313d4fb0be4d4054a16cb13d819)
to branch 'im.pidgin.cpw.darkrain42.buddy-add' (head 8c6ff5a8cf91db250e9440fa0acab89d7fefe4ac)
| author | Paul Aurich <paul@darkrain42.org> |
|---|---|
| date | Sat, 07 Mar 2009 01:23:51 +0000 |
| parents | c0b42d6c2785 ae544623840b |
| children | 324cc0d6ca0a |
line wrap: on
line diff
--- a/libpurple/protocols/myspace/user.c Thu Mar 05 23:54:50 2009 +0000 +++ b/libpurple/protocols/myspace/user.c Sat Mar 07 01:23:51 2009 +0000 @@ -41,10 +41,10 @@ } /** - * Get the MsimUser from a PurpleBuddy, creating it if needed. + * Get the MsimUser from a PurpleBuddy, optionally creating it if needed. */ MsimUser * -msim_get_user_from_buddy(PurpleBuddy *buddy) +msim_get_user_from_buddy(PurpleBuddy *buddy, gboolean create) { MsimUser *user; @@ -52,7 +52,8 @@ return NULL; } - if (!(user = purple_buddy_get_protocol_data(buddy))) { + user = purple_buddy_get_protocol_data(buddy); + if (create && !user) { /* No MsimUser for this buddy; make one. */ user = g_new0(MsimUser, 1); @@ -94,7 +95,7 @@ return NULL; } - user = msim_get_user_from_buddy(buddy); + user = msim_get_user_from_buddy(buddy, TRUE); return user; }
