uhliarik commented on PR #44:
URL: https://github.com/apache/apr/pull/44#issuecomment-1605050843

   Reproducer:
   
   run: 
   
   $ ./memcachecon 127.0.0.1 11211
   $ ./memcachecon ::1 11211
   
   ```#include <apr.h>
   #include <apr_memcache.h>
   
   #include <stdlib.h>
   
   int main(int argc, char **argv)
   {
       apr_pool_t *pglobal;
       apr_status_t rv;
       char *mcversion;
       char *errstr = malloc(1024);
   
       apr_app_initialize(NULL, NULL, NULL);
   
       if (apr_pool_create(&pglobal, NULL)){
           fprintf(stderr, "could not create global pool");
           return 1;
       }
   
       if (argc != 3){
           fprintf(stderr, "Usage: ./connconnectipv6 HOST PORT\n");
           return 2;
       }
   
       apr_memcache_server_t *ms;
   
       rv = apr_memcache_server_create(pglobal, argv[1], atoi(argv[2]), 0, 2, 
2, 60, &ms);
       if (rv != APR_SUCCESS){.
           fprintf(stderr, "Errno: %d - %s\n", errno, apr_strerror(errno, 
errstr, 1024));
           return 3;
       }
   
       rv = apr_memcache_version(ms, pglobal, &mcversion);
       if (rv != APR_SUCCESS){.
          fprintf(stderr, "Errno: %d - %s\n", errno, apr_strerror(errno, 
errstr, 1024));
          return 5;
       }
   
       fprintf(stdout, "memcached version: %s\n", mcversion);
   
       apr_pool_destroy(pglobal);
   
       return 0;
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@apr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to