Set private port's user data on creation
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Apr 2017 23:17:04 +0000 (19:17 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:41 +0000 (12:57 -0400)
commit3e9b00233085bfafb21da3746f41d7d1876920dd
treec59710ba11a86f2cf892b1cb822ff68bb08637ba
parenta9f0d01b276e2bb637ad4bea1e8863e144911f55
Set private port's user data on creation

With separate port creation and user data setting calls, the following
scenario is problematic:

    Source adds a port (private data is not set yet)
      Graph user's "port added" callback is called
        This callback connects the new port to a sink port
          This sink's "port connected" method is called
            This sink creates a notification iterator on the connected
            port's connection
              The source's notification iterator initialization method
              is called with the added port with NO private data yet

With this change, it is guaranteed that as soon as the port can be
accessed by any user, its private data is set.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
15 files changed:
include/babeltrace/graph/component-internal.h
include/babeltrace/graph/port-internal.h
include/babeltrace/graph/private-component-filter.h
include/babeltrace/graph/private-component-sink.h
include/babeltrace/graph/private-component-source.h
include/babeltrace/graph/private-port.h
lib/graph/component.c
lib/graph/filter.c
lib/graph/port.c
lib/graph/sink.c
lib/graph/source.c
plugins/ctf/fs/fs.c
plugins/utils/muxer/muxer.c
tests/lib/test_graph_topo.c
tests/plugins/test-utils-muxer.c
This page took 0.026425 seconds and 4 git commands to generate.