projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated tests (including one possible failing test from Brian Moon)
[awesomized/libmemcached]
/
src
/
memcp.c
diff --git
a/src/memcp.c
b/src/memcp.c
index f51c93cb16281fa649dc406e28c0b5ffc805d35e..09d7e9119b0ec75b30085efe6f11c8eff248ecf8 100644
(file)
--- a/
src/memcp.c
+++ b/
src/memcp.c
@@
-1,4
+1,6
@@
#include <stdio.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/types.h>
@@
-7,6
+9,8
@@
#include <fcntl.h>
#include <errno.h>
#include <strings.h>
#include <fcntl.h>
#include <errno.h>
#include <strings.h>
+#include <string.h>
+#include <assert.h>
#include <memcached.h>
#include "client_options.h"
#include <memcached.h>
#include "client_options.h"
@@
-112,8
+116,13
@@
int main(int argc, char *argv[])
opt_expires, opt_flags);
if (rc != MEMCACHED_SUCCESS)
opt_expires, opt_flags);
if (rc != MEMCACHED_SUCCESS)
- fprintf(stderr, "memcp: %s: memcache error %s\n",
+ {
+ fprintf(stderr, "memcp: %s: memcache error %s",
ptr, memcached_strerror(memc, rc));
ptr, memcached_strerror(memc, rc));
+ if (memc->cached_errno)
+ fprintf(stderr, " system error %s", strerror(memc->cached_errno));
+ fprintf(stderr, "\n");
+ }
free(file_buffer_ptr);
close(fd);
free(file_buffer_ptr);
close(fd);