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
This commit is contained in:
bencollins 2003-09-26 13:51:31 +00:00
parent 2e8ba91c51
commit 0072343aab
1 changed files with 10 additions and 10 deletions

View File

@ -255,20 +255,20 @@ int raw1394_start_async_stream(struct raw1394_handle *handle,
unsigned int speed, size_t length, quadlet_t *data, unsigned int speed, size_t length, quadlet_t *data,
unsigned long rawtag) 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.type = RAW1394_REQ_ASYNC_STREAM;
req->generation = handle->generation; req.generation = handle->generation;
req->tag = rawtag; req.tag = rawtag;
req->address = ((__u64)channel << 48) | speed; req.address = ((__u64)channel << 48) | speed;
req->misc = (tag << 16) | sy; req.misc = (tag << 16) | sy;
req->length = length; req.length = length;
req->sendb = ptr2int(data); 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, int raw1394_start_async_send(struct raw1394_handle *handle,