3 memcached_return_t
memcached_verbosity(memcached_st
*ptr
, unsigned int verbosity
)
8 char buffer
[MEMCACHED_DEFAULT_COMMAND_SIZE
];
10 send_length
= (size_t) snprintf(buffer
, MEMCACHED_DEFAULT_COMMAND_SIZE
,
11 "verbosity %u\r\n", verbosity
);
12 unlikely (send_length
>= MEMCACHED_DEFAULT_COMMAND_SIZE
)
13 return MEMCACHED_WRITE_FAILURE
;
15 rc
= MEMCACHED_SUCCESS
;
16 for (x
= 0; x
< ptr
->number_of_hosts
; x
++)
18 memcached_return_t rrc
;
20 rrc
= memcached_do(&ptr
->hosts
[x
], buffer
, send_length
, 1);
21 if (rrc
!= MEMCACHED_SUCCESS
)
23 rc
= MEMCACHED_SOME_ERRORS
;
27 unlikely (ptr
->flags
.use_udp
)
30 rrc
= memcached_response(&ptr
->hosts
[x
], buffer
, MEMCACHED_DEFAULT_COMMAND_SIZE
, NULL
);
31 if (rrc
!= MEMCACHED_SUCCESS
)
32 rc
= MEMCACHED_SOME_ERRORS
;