summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/rkt/rkt.c7
-rw-r--r--src/til_stream.c4
-rw-r--r--src/til_stream.h2
3 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/rkt/rkt.c b/src/modules/rkt/rkt.c
index ab55d0f..82dff44 100644
--- a/src/modules/rkt/rkt.c
+++ b/src/modules/rkt/rkt.c
@@ -202,9 +202,12 @@ static int rkt_pipe_update(void *context, til_stream_pipe_t *pipe, const void *o
return 0;
}
+ /* TODO: it would be nice if we could just use the same til_stream_tap() API as everything
+ * else does. til_stream_pipe_set_driving_tap() shouldn't really be necessary, since rkt'd
+ * _always_ win the race to drive for pipes under rkt's purview.
+ */
rkt_pipe->tap.inactive = 0;
- if (driving_tap != &rkt_pipe->tap)
- til_stream_pipe_set_driving_tap(pipe, &rkt_pipe->tap);
+ til_stream_pipe_set_driving_tap(ctxt->til_module_context.stream, pipe, &rkt_pipe->tap);
/* otherwise get the current interpolated value from the rocket track @ owner_foo->track
* to update owner_foo->var.[fd], which _should_ be the driving tap.
diff --git a/src/til_stream.c b/src/til_stream.c
index eec0af4..3c0a4f5 100644
--- a/src/til_stream.c
+++ b/src/til_stream.c
@@ -516,11 +516,13 @@ void til_stream_pipe_set_owner(til_stream_pipe_t *pipe, const void *owner, const
/* NULLing out the driving_tap isn't supported, since the tap name is part of the pipe's identity,
* just set tap.inactive to indicate another tap should take over driving.
*/
-void til_stream_pipe_set_driving_tap(til_stream_pipe_t *pipe, const til_tap_t *driving_tap)
+void til_stream_pipe_set_driving_tap(til_stream_t *stream, til_stream_pipe_t *pipe, const til_tap_t *driving_tap)
{
+ assert(stream);
assert(pipe);
assert(driving_tap);
+ pipe->frame = stream->frame;
pipe->driving_tap = driving_tap;
}
diff --git a/src/til_stream.h b/src/til_stream.h
index 54bbdc5..317fe8f 100644
--- a/src/til_stream.h
+++ b/src/til_stream.h
@@ -66,7 +66,7 @@ void til_stream_fprint_pipes(til_stream_t *stream, FILE *out);
int til_stream_for_each_pipe(til_stream_t *stream, til_stream_pipe_iter_func_t pipe_cb, void *cb_arg);
void til_stream_pipe_set_owner(til_stream_pipe_t *pipe, const void *owner, const void *owner_foo);
-void til_stream_pipe_set_driving_tap(til_stream_pipe_t *pipe, const til_tap_t *driving_tap);
+void til_stream_pipe_set_driving_tap(til_stream_t *stream, til_stream_pipe_t *pipe, const til_tap_t *driving_tap);
typedef int (til_stream_module_context_iter_func_t)(void *context, til_stream_module_context_t *module_context, size_t n_module_contexts, const til_module_context_t **contexts);
© All Rights Reserved