~brianaker/libmemcached/embedded

« back to all changes in this revision

Viewing changes to libmemcached/memcached_server.c

  • Committer: brian@gir-2.local
  • Date: 2008-03-10 15:04:41 UTC
  • mto: (317.6.1)
  • mto: This revision was merged to the branch mainline in revision 321.
  • Revision ID: brian@gir-2.local-20080310150441-jyhbjx6bwo46f6tg
Huge refactoring of directory structure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "common.h"
 
2
 
 
3
memcached_return memcached_server_cursor(memcached_st *ptr, 
 
4
                                         memcached_server_function *callback,
 
5
                                         void *context,
 
6
                                         unsigned int number_of_callbacks)
 
7
{
 
8
  unsigned int y;
 
9
 
 
10
  for (y= 0; y < ptr->number_of_hosts; y++)
 
11
  {
 
12
    unsigned int x;
 
13
 
 
14
    for (x= 0; x < number_of_callbacks; x++)
 
15
    {
 
16
      unsigned int iferror;
 
17
 
 
18
      iferror= (*callback[x])(ptr, &ptr->hosts[y], context);
 
19
 
 
20
      if (iferror)
 
21
        continue;
 
22
    }
 
23
  }
 
24
 
 
25
  return MEMCACHED_SUCCESS;
 
26
}