memcache_test.c
changeset 44 03a7e064f833
parent 38 9894df13b779
child 46 8a832c0e01ee
equal deleted inserted replaced
43:e5b714190dee 44:03a7e064f833
    16 
    16 
    17 void begin_test () {
    17 void begin_test () {
    18     if ((mc = memcache_alloc(&_memcache_cb)) == NULL)
    18     if ((mc = memcache_alloc(&_memcache_cb)) == NULL)
    19         ERROR("memcache_alloc");
    19         ERROR("memcache_alloc");
    20     
    20     
       
    21     // fix up the endpoint
    21     endpoint_init(&server_endpoint, 11211);
    22     endpoint_init(&server_endpoint, 11211);
    22     
    23     
    23     if (endpoint_parse(&server_endpoint, "localhost"))
    24     if (endpoint_parse(&server_endpoint, "localhost"))
    24         ERROR("config_endpoint_parse");
    25         ERROR("config_endpoint_parse");
    25 
    26     
       
    27     // add the server
    26     if (memcache_add_server(mc, &server_endpoint, 1))
    28     if (memcache_add_server(mc, &server_endpoint, 1))
    27         ERROR("memcache_add_server");
    29         ERROR("memcache_add_server");
       
    30    
       
    31     // add a request or two
    28     
    32     
    29     // XXX: we should have a connect() running now
    33     
    30 
    34 
    31 error:
    35 error:
    32     return;
    36     return;
    33 }
    37 }
    34 
    38