summaryrefslogtreecommitdiff
path: root/src/til_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/til_stream.c')
-rw-r--r--src/til_stream.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/til_stream.c b/src/til_stream.c
index 60c28d4..4109d8f 100644
--- a/src/til_stream.c
+++ b/src/til_stream.c
@@ -163,11 +163,14 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_fo
return -1;
}
- /* this looks to be our pipe, but we're not driving */
+ /* this looks to be the pipe, but we're not driving, should we be? */
+ if (pipe->driving_tap->inactive)
+ pipe->driving_tap = tap;
+
*(tap->ptr) = pipe->driving_tap->elems;
pthread_mutex_unlock(&stream->mutex);
- return 1;
+ return (tap != pipe->driving_tap);
}
}
}
© All Rights Reserved