[Bug 62572] New: JingleSession::terminated should use a GError

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 20 20:49:11 CET 2013


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

          Priority: medium
            Bug ID: 62572
          Assignee: telepathy-bugs at lists.freedesktop.org
           Summary: JingleSession::terminated should use a GError
        QA Contact: telepathy-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: will.thompson at collabora.co.uk
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: General
           Product: Wocky

Right now, the WockyJingleSession::terminated has three arguments, two of which
are a member of the WockyJingleReason enum and a human-readable string.

Meanwhile, _on_initiate_reply() passes NULL as the GError parameter for
wocky_porter_send_iq_finish() and wocky_stanza_extract_errors(), and ends the
session with REASON_UNKNOWN if either of them fails. It would be nice if the
application could (optionally) get more details about what happened.

So I suggest:

* Create a GError domain for WockyJingleReason (not sure what name the quark
macro should have. WOCKY_JINGLE_REASON would work but might be confusing since
WOCKY_TYPE_JINGLE_REASON also exists but WOCKY_JINGLE_REASON is not a cast
macro);
* Make ::terminated include a GError *, which may be NULL;
* Make the current cases where UNKNOWN is used in place of a better error use
that error, and the cases where it is used to mean "no error" use NULL for the
GError *.

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