projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
a1ca550
)
Preserve errno for write failures
author
Robey Pointer
<robey@twitter.com>
Thu, 26 Feb 2009 08:25:38 +0000
(09:25 +0100)
committer
Robey Pointer
<robey@twitter.com>
Thu, 26 Feb 2009 08:25:38 +0000
(09:25 +0100)
libmemcached/memcached_io.c
patch
|
blob
|
history
diff --git
a/libmemcached/memcached_io.c
b/libmemcached/memcached_io.c
index ffbd680648814690ac5bc683511bf0b7c22758d8..72a02a0f97f52b030b3c1ab45cefa84b742c4bf4 100644
(file)
--- a/
libmemcached/memcached_io.c
+++ b/
libmemcached/memcached_io.c
@@
-338,6
+338,7
@@
static ssize_t io_flush(memcached_server_st *ptr,
if ((sent_length= write(ptr->fd, local_write_ptr,
write_length)) == -1)
{
+ ptr->cached_errno= errno;
switch (errno)
{
case ENOBUFS:
@@
-355,7
+356,6
@@
static ssize_t io_flush(memcached_server_st *ptr,
}
default:
memcached_quit_server(ptr, 1);
- ptr->cached_errno= errno;
*error= MEMCACHED_ERRNO;
return -1;
}