[Bug 27317] New: Permit wocky_xmpp_stanza_build (..., ASSIGN_TO, NULL, ...)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 25 19:27:51 CET 2010


http://bugs.freedesktop.org/show_bug.cgi?id=27317

           Summary: Permit wocky_xmpp_stanza_build (..., ASSIGN_TO, NULL,
                    ...)
           Product: Wocky
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: General
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk


The pubsub code has a load of helper functions to build stanzas for various
pubsub actions, where the caller can optionally pass addresses to store
pointers to the <pubsub> node, the <create> node, etc. Currently they all look
like this:

WockyXmppStanza *
wocky_pubsub_blah_create_foo_stanza (
   WockyPubsubBlah *self,
   WockyPubsubNode **pubsub_node,
   WockyPubsubNOde **foo_node)
{
  WockyPubsubStanza *stanza;
  WockyPubsubNode *pubsub, *foo;

  stanza = build (...,
      SHOUTY SHOUTY,
        SHOUTY_ASSIGN_TO, &pubsub, ..... );

  if (pubsub_node != NULL)
    *pubsub_node = pubsub;
}

It might be nice to let build accept NULL targets, and just not assign in that
case. On the flipside, it arguably makes it harder to detect you screwing up.


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



More information about the telepathy-bugs mailing list