X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemcat.c;h=3f0d92b4af6e8afceab649e74950ad89a59c1470;hb=1c8df302c16c766ef628eb4adfcac4ac30437026;hp=f50b069dc53844095fe6a4c17a188eaafca8fb62;hpb=49a02c953ab03f71b819e7a5f68ef7a0e5857544;p=awesomized%2Flibmemcached diff --git a/clients/memcat.c b/clients/memcat.c index f50b069d..3f0d92b4 100644 --- a/clients/memcat.c +++ b/clients/memcat.c @@ -48,6 +48,7 @@ int main(int argc, char *argv[]) int return_code= 0; options_parse(argc, argv); + initialize_sockets(); if (!opt_servers) { @@ -75,7 +76,7 @@ int main(int argc, char *argv[]) if (!initialize_sasl(memc, opt_username, opt_passwd)) { memcached_free(memc); - return 1; + return EXIT_FAILURE; } while (optind < argc) @@ -137,9 +138,9 @@ int main(int argc, char *argv[]) { fprintf(stderr, "memcat: %s: memcache error %s", argv[optind], memcached_strerror(memc, rc)); - if (memc->cached_errno) + if (memcached_last_error_errno(memc)) { - fprintf(stderr, " system error %s", strerror(memc->cached_errno)); + fprintf(stderr, " system error %s", strerror(memcached_last_error_errno(memc))); } fprintf(stderr, "\n");