[Pidgin] #2752: msimprpl makes duplicate groups when importing friends

Pidgin trac at pidgin.im
Fri Aug 24 00:22:58 EDT 2007


#2752: msimprpl makes duplicate groups when importing friends
-----------------------+----------------------------------------------------
 Reporter:  jeff       |       Owner:  jeff 
     Type:  defect     |      Status:  new  
 Priority:  major      |   Milestone:       
Component:  libpurple  |     Version:  2.1.1
 Keywords:  msimprpl   |     Pending:  0    
-----------------------+----------------------------------------------------
 When adding friends from myspace.com, msimprpl creates a group for each
 buddy, even when multiple groups have the same name.

 See http://msimprpl.darkthoughts.net/duplicate-groups.png.

 For each buddy, in msim_add_contact_from_server_cb, I call:
 {{{
                 group = purple_group_new(group_name);
 }}}

 which seems like it could be the problem. But blist.h says:
 {{{
 /**
  * Creates a new group
  *
  * You can't have more than one group with the same name.  Sorry.  If you
 pass
  * this the * name of a group that already exists, it will return that
 group.
  *
  * @param name   The name of the new group
  * @return       A new group struct
 */
 PurpleGroup *purple_group_new(const char *name);
 }}}

 and blist.c confirms:
 {{{
 PurpleGroup *purple_group_new(const char *name)
 {
         PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
         PurpleGroup *group;

         g_return_val_if_fail(name  != NULL, NULL);
         g_return_val_if_fail(*name != '\0', NULL);

         group = purple_find_group(name);
         if (group != NULL)
                 return group;
 }}}
 Libpurple problem?

-- 
Ticket URL: <http://developer.pidgin.im/ticket/2752>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list