~ubuntu-branches/ubuntu/oneiric/empathy/oneiric-updates

« back to all changes in this revision

Viewing changes to libempathy/empathy-individual-manager.c

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2011-08-22 14:16:36 UTC
  • mfrom: (1.1.75 upstream)
  • Revision ID: james.westby@ubuntu.com-20110822141636-iiju0fvx1f9sl3oz
Tags: 3.1.5.1-1ubuntu1
* New upstream version
  - crashed with SIGSEGV in dbus_connection_dispatch (LP: #829826)

Show diffs side-by-side

added added

removed removed

Lines of Context:
531
531
 
532
532
      if (TPF_IS_PERSONA (persona))
533
533
        {
534
 
          conn = tp_contact_get_connection (tpf_persona_get_contact (persona));
535
 
          manager = empathy_contact_manager_dup_singleton ();
536
 
 
537
 
          if (empathy_contact_manager_get_flags_for_connection (manager, conn) &
538
 
              EMPATHY_CONTACT_LIST_CAN_BLOCK)
539
 
            retval = TRUE;
540
 
 
541
 
          g_object_unref (manager);
 
534
          TpContact *tp_contact;
 
535
 
 
536
          tp_contact = tpf_persona_get_contact (persona);
 
537
          if (tp_contact != NULL)
 
538
            {
 
539
              conn = tp_contact_get_connection (tp_contact);
 
540
              manager = empathy_contact_manager_dup_singleton ();
 
541
 
 
542
              if (empathy_contact_manager_get_flags_for_connection (
 
543
                    manager, conn) &
 
544
                  EMPATHY_CONTACT_LIST_CAN_BLOCK)
 
545
                retval = TRUE;
 
546
 
 
547
              g_object_unref (manager);
 
548
            }
542
549
        }
543
550
      g_clear_object (&persona);
544
551
    }
569
576
 
570
577
      if (TPF_IS_PERSONA (persona))
571
578
        {
572
 
          contact = empathy_contact_dup_from_tp_contact (
573
 
              tpf_persona_get_contact (persona));
574
 
          empathy_contact_set_persona (contact, FOLKS_PERSONA (persona));
575
 
          manager = empathy_contact_manager_dup_singleton ();
576
 
          flags = empathy_contact_manager_get_flags_for_connection (manager,
577
 
              empathy_contact_get_connection (contact));
578
 
 
579
 
          if (flags & EMPATHY_CONTACT_LIST_CAN_BLOCK)
580
 
            empathy_contact_list_set_blocked (
581
 
                EMPATHY_CONTACT_LIST (manager),
582
 
                contact, blocked, abusive);
583
 
 
584
 
          g_object_unref (manager);
585
 
          g_object_unref (contact);
 
579
          TpContact *tp_contact;
 
580
 
 
581
          tp_contact = tpf_persona_get_contact (persona);
 
582
          if (tp_contact != NULL)
 
583
            {
 
584
              contact = empathy_contact_dup_from_tp_contact (tp_contact);
 
585
              empathy_contact_set_persona (contact, FOLKS_PERSONA (persona));
 
586
              manager = empathy_contact_manager_dup_singleton ();
 
587
              flags = empathy_contact_manager_get_flags_for_connection (manager,
 
588
                  empathy_contact_get_connection (contact));
 
589
 
 
590
              if (flags & EMPATHY_CONTACT_LIST_CAN_BLOCK)
 
591
                empathy_contact_list_set_blocked (
 
592
                    EMPATHY_CONTACT_LIST (manager),
 
593
                    contact, blocked, abusive);
 
594
 
 
595
              g_object_unref (manager);
 
596
              g_object_unref (contact);
 
597
            }
586
598
        }
587
599
      g_clear_object (&persona);
588
600
    }