From 0072343aabd43e23d8ce4ba255afbc4622a1da64 Mon Sep 17 00:00:00 2001 From: bencollins Date: Fri, 26 Sep 2003 13:51:31 +0000 Subject: [PATCH] Fixup async_stream to use same local req variable for reentrancy. git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@132 53a565d1-3bb7-0310-b661-cf11e63c67ab --- src/readwrite.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/readwrite.c b/src/readwrite.c index ca6ac56..4e2e6ea 100644 --- a/src/readwrite.c +++ b/src/readwrite.c @@ -255,20 +255,20 @@ int raw1394_start_async_stream(struct raw1394_handle *handle, unsigned int speed, size_t length, quadlet_t *data, unsigned long rawtag) { - struct raw1394_request *req = &handle->req; + struct raw1394_request req; - CLEAR_REQ(req); + CLEAR_REQ(&req); - req->type = RAW1394_REQ_ASYNC_STREAM; - req->generation = handle->generation; - req->tag = rawtag; + req.type = RAW1394_REQ_ASYNC_STREAM; + req.generation = handle->generation; + req.tag = rawtag; - req->address = ((__u64)channel << 48) | speed; - req->misc = (tag << 16) | sy; - req->length = length; - req->sendb = ptr2int(data); + req.address = ((__u64)channel << 48) | speed; + req.misc = (tag << 16) | sy; + req.length = length; + req.sendb = ptr2int(data); - return (int)write(handle->fd, req, sizeof(*req)); + return (int)write(handle->fd, &req, sizeof(req)); } int raw1394_start_async_send(struct raw1394_handle *handle,