~jbingham-gmail/libmemcached/embedded-ct

« back to all changes in this revision

Viewing changes to libmemcached/memcached.c

  • Committer: Trond Norbye
  • Date: 2009-12-04 13:08:17 UTC
  • Revision ID: tn202803@tor01-20091204130817-8oku2f80uq4apr4g
Recreate embedded branch from scratch

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
  ptr->io_msg_watermark= 500;
35
35
  ptr->io_bytes_watermark= 65 * 1024;
36
36
 
 
37
  ptr->protocol_hooks= get_protocol_hooks(LIBMEMCACHED_ASCII_PROTOCOL);
37
38
  return ptr;
38
39
}
39
40
 
41
42
{
42
43
  /* If we have anything open, lets close it now */
43
44
  memcached_quit(ptr);
 
45
  ptr->protocol_hooks->free_hook(ptr);
 
46
 
44
47
  server_list_free(ptr, ptr->hosts);
45
48
  memcached_result_free(&ptr->result);
46
49
 
106
109
  new_clone->io_bytes_watermark= source->io_bytes_watermark;
107
110
  new_clone->io_key_prefetch= source->io_key_prefetch;
108
111
  new_clone->number_of_replicas= source->number_of_replicas;
 
112
  new_clone->protocol_hooks= source->protocol_hooks;
109
113
 
110
114
  if (source->hosts)
111
115
    rc= memcached_server_push(new_clone, source->hosts);
117
121
    return NULL;
118
122
  }
119
123
 
 
124
  if (new_clone->protocol_hooks->clone_hook(source,
 
125
                                            new_clone) != MEMCACHED_SUCCESS)
 
126
  {
 
127
    memcached_free(new_clone);
 
128
    return NULL;
 
129
  }
120
130
 
121
131
  if (source->prefix_key[0] != 0)
122
132
  {
148
158
  ptr->user_data= data;
149
159
  return ret;
150
160
}
 
161
 
 
162
memcached_return memcached_noop_clone_hook(memcached_st *org,
 
163
                                           memcached_st *clone)
 
164
{
 
165
  (void)org;
 
166
  (void)clone;
 
167
  return MEMCACHED_SUCCESS;
 
168
}
 
169
 
 
170
void memcached_noop_free_hook(memcached_st *instance)
 
171
{
 
172
   (void)instance;
 
173
}