X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemcp.c;h=dd8aba9ac907e9001d6e823374e7cf498520af8f;hb=98d4dea6ae8869b6fe5e37a2908d66ff062b8f39;hp=8109ea7e9c19194dd759e910091f4ce5889290dd;hpb=c67da677fe0944d3d2d3ff46e65fc3bc775404ae;p=m6w6%2Flibmemcached diff --git a/clients/memcp.c b/clients/memcp.c index 8109ea7e..dd8aba9a 100644 --- a/clients/memcp.c +++ b/clients/memcp.c @@ -75,6 +75,8 @@ int main(int argc, char *argv[]) memcached_return_t rc; memcached_server_st *servers; + int return_code= 0; + options_parse(argc, argv); memc= memcached_create(NULL); @@ -85,7 +87,9 @@ int main(int argc, char *argv[]) char *temp; if ((temp= getenv("MEMCACHED_SERVERS"))) + { opt_servers= strdup(temp); + } else { fprintf(stderr, "No Servers provided\n"); @@ -174,6 +178,8 @@ int main(int argc, char *argv[]) if (memc->cached_errno) fprintf(stderr, " system error %s", strerror(memc->cached_errno)); fprintf(stderr, "\n"); + + return_code= -1; } free(file_buffer_ptr); @@ -188,7 +194,7 @@ int main(int argc, char *argv[]) if (opt_hash) free(opt_hash); - return 0; + return return_code; } static void options_parse(int argc, char *argv[])