3 memcached_return
memcached_fetch_execute(memcached_st
*ptr
,
4 memcached_execute_function
*callback
,
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
->hosts
[ptr
->cursor_server
]) == 0)
23 rc
= memcached_response(&ptr
->hosts
[ptr
->cursor_server
], buffer
, MEMCACHED_DEFAULT_COMMAND_SIZE
, result
);
25 if (rc
== MEMCACHED_END
) /* END means that we move on to the next */
27 memcached_server_response_reset(&ptr
->hosts
[ptr
->cursor_server
]);
31 else if (rc
== MEMCACHED_SUCCESS
)
35 for (x
= 0; x
< number_of_callbacks
; x
++)
37 memcached_return iferror
;
39 iferror
= (*callback
[x
])(ptr
, result
, context
);
41 if (iferror
!= MEMCACHED_SUCCESS
)
47 return MEMCACHED_SUCCESS
;