projects
/
nbd.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d4b9f4
)
copy handle on all requests
author
Alex Bligh <alex@alex.org.uk>
Wed, 18 May 2011 18:02:48 +0000
(19:02 +0100)
committer
Alex Bligh <alex@alex.org.uk>
Wed, 18 May 2011 18:02:48 +0000
(19:02 +0100)
nbd-server.c
patch
|
blob
|
history
diff --git
a/nbd-server.c
b/nbd-server.c
index
21fa563
..
4122cef
100644
(file)
--- a/
nbd-server.c
+++ b/
nbd-server.c
@@
-1452,8
+1452,9
@@
int mainloop(CLIENT *client) {
"READ", (unsigned long long)request.from,
(unsigned long long)request.from / 512, len);
#endif
+ memcpy(reply.handle, request.handle, sizeof(reply.handle));
+
if ((command==NBD_CMD_WRITE) || (command==NBD_CMD_READ)) {
- memcpy(reply.handle, request.handle, sizeof(reply.handle));
if ((request.from + len) > (OFFT_MAX)) {
DEBUG("[Number too large!]");
ERROR(client, reply, EINVAL);