3 memcached_return
memcached_fetch_execute(memcached_st
*ptr
,
4 unsigned int (*callback
[])(memcached_st
*ptr
, memcached_result_st
*result
, void *context
),
6 unsigned int number_of_callbacks
9 memcached_result_st
*result
= &ptr
->result
;
11 while (ptr
->cursor_server
< ptr
->number_of_hosts
)
15 char buffer
[MEMCACHED_DEFAULT_COMMAND_SIZE
];
17 if (memcached_server_response_count(ptr
, ptr
->cursor_server
) == 0)
23 rc
= memcached_response(ptr
, buffer
, MEMCACHED_DEFAULT_COMMAND_SIZE
, result
, ptr
->cursor_server
);
25 if (rc
== MEMCACHED_END
) /* END means that we move on to the next */
27 memcached_server_response_reset(ptr
, ptr
->cursor_server
);
31 else if (rc
== MEMCACHED_SUCCESS
)
35 for (x
= 0; x
< number_of_callbacks
; x
++)
39 iferror
= (*callback
[x
])(ptr
, result
, context
);
47 return MEMCACHED_SUCCESS
;