[Bug 38524] New: TpChannel: priv->handle_type overrided during object construction

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 21 15:39:10 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=38524

           Summary: TpChannel: priv->handle_type overrided during object
                    construction
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: guillaume.desmottes at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


I create a TpChannel subclass using:

g_object_new (EMPATHY_TYPE_TP_CHAT,
                 "account", account,
                 "connection", conn,
                 "dbus-daemon", conn_proxy->dbus_daemon,
                 "bus-name", conn_proxy->bus_name,
                 "object-path", object_path,
                 "channel-properties", immutable_properties,
                 NULL);


The props hash table contains the right handle-type (TP_HANDLE_TYPE_ROOM), as
expected.

But if I call tp_channel_get_handle() it returns TP_HANDLE_TYPE_NONE as handle
type!

After some debugging I noticed that the following happen:
- _tp_channel_maybe_set_handle_type() is called a first time when setting the
PROP_CHANNEL_PROPERTIES property; handle-type is correctly defined.
- _tp_channel_maybe_set_handle_type() is called a second time as the default
setter for the handle-type property (which was not defined in g_object_new),
setting it back to TP_HANDLE_TYPE_NONE


_tp_channel_maybe_set_handle_type() thinks that the handle_type is valid
because it's NONE and not UNKNOWN. Setting TP_UNKNOWN_HANDLE_TYPE as default
handle-type in channel-iface solves this but I'm really wondering why we didn't
hit this issue before, this is very old code.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list