42
42
// Debug function to dump a clusterReply structure recursively
43
43
static void dump_reply(clusterReply *reply, int indent) {
44
smart_string buf = {0};
47
47
switch(reply->type) {
49
smart_str_appendl(&buf, "(error) ", sizeof("(error) ")-1);
50
smart_str_appendl(&buf, reply->str, reply->len);
49
smart_string_appendl(&buf, "(error) ", sizeof("(error) ")-1);
50
smart_string_appendl(&buf, reply->str, reply->len);
53
smart_str_appendl(&buf, reply->str, reply->len);
53
smart_string_appendl(&buf, reply->str, reply->len);
56
smart_str_appendl(&buf, "(integer) ", sizeof("(integer) ")-1);
57
smart_str_append_long(&buf, reply->integer);
56
smart_string_appendl(&buf, "(integer) ", sizeof("(integer) ")-1);
57
smart_string_append_long(&buf, reply->integer);
60
smart_str_appendl(&buf,"\"", 1);
61
smart_str_appendl(&buf, reply->str, reply->len);
62
smart_str_appendl(&buf, "\"", 1);
60
smart_string_appendl(&buf,"\"", 1);
61
smart_string_appendl(&buf, reply->str, reply->len);
62
smart_string_appendl(&buf, "\"", 1);
64
64
case TYPE_MULTIBULK:
65
65
if(reply->elements == (size_t)-1) {
66
smart_str_appendl(&buf, "(nil)", sizeof("(nil)")-1);
66
smart_string_appendl(&buf, "(nil)", sizeof("(nil)")-1);
68
68
for(i=0;i<reply->elements;i++) {
69
69
dump_reply(reply->element[i], indent+2);
478
478
void cluster_multi_fini(clusterMultiCmd *mc) {
480
480
redis_cmd_init_sstr(&(mc->cmd), mc->argc, mc->kw, mc->kw_len);
481
smart_str_appendl(&(mc->cmd), mc->args.c, mc->args.len);
481
smart_string_appendl(&(mc->cmd), mc->args.c, mc->args.len);
484
484
/* Set our last error string encountered */