equal
deleted
inserted
replaced
53 static struct memcache_req *_memcache_req (struct memcache *mc, enum memcache_command cmd, const struct memcache_key *key, const struct memcache_obj *obj, const struct memcache_buf *buf, void *cb_arg) { |
53 static struct memcache_req *_memcache_req (struct memcache *mc, enum memcache_command cmd, const struct memcache_key *key, const struct memcache_obj *obj, const struct memcache_buf *buf, void *cb_arg) { |
54 struct memcache_req *req = NULL; |
54 struct memcache_req *req = NULL; |
55 struct memcache_server *server = NULL; |
55 struct memcache_server *server = NULL; |
56 |
56 |
57 // alloc the request |
57 // alloc the request |
58 if ((req = memcache_req_alloc(mc, MEMCACHE_CMD_FETCH_GET, key, obj, buf, cb_arg)) == NULL) |
58 if ((req = memcache_req_alloc(mc, cmd, key, obj, buf, cb_arg)) == NULL) |
59 ERROR("failed to allocate request"); |
59 ERROR("failed to allocate request"); |
60 |
60 |
61 // pick a server |
61 // pick a server |
62 if ((server = memcache_choose_server(mc, key)) == NULL) |
62 if ((server = memcache_choose_server(mc, key)) == NULL) |
63 ERROR("failed to find a server to use"); |
63 ERROR("failed to find a server to use"); |