[Bug 34796] Implement ContactInfo

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 21 23:47:01 CET 2011


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

--- Comment #18 from Debarshi Ray <debarshi.ray at gmail.com> 2011-03-21 15:47:00 PDT ---
(In reply to comment #13)
> Review of attachment 44075 [details]:

> ::: src/idle-contact-info.c
> @@ +269,3 @@
> +    g_value_array_prepend(norm_args, &value);
> +
> +     * caused by us, and we do not want to handle it.
> 
> These contortions make it look like _is_valid_response() should be changed to
> take a TpHandle as the second argument, rather than having to fake up a
> GValueArray which it just grabs the first element of.

That is true. I never thought about it.

On the other hand, this ERR_NOSUCHSERVER is an exception in the sense that all
the other numeric replies to a WHOIS will have a handle as the first element.
So by passing the whole GValueArray we can avoid having the following statement
repeated in all the handlers:
    TpHandle handle = g_value_get_uint(g_value_array_get_nth(args, 0));

Having said that, even now the following snippet is repeated in almost every
handler:
    request = g_queue_peek_head(conn->contact_info_requests);

    if (request->contact_info == NULL)
        request->contact_info =
dbus_g_type_specialized_construct(TP_ARRAY_TYPE_CONTACT_INFO_FIELD_LIST);

I have no preferences. :-)

> @@ +274,3 @@
> +    request = g_queue_peek_head(conn->contact_info_requests);
> +
> +     * To check this we map the value of the <server name> to a handle and see
> if it matches the handle for which we had made the request.
> 
> The fact that the error is “no such server” is an IRC protocol oddity, and I
> imagine this will confuse people reading dbus-monitor! Maybe the message could
> be something like “User '%s' unknown; they may have disconnected”?

Done.

-- 
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