~brianaker/libmemcached/1164440

« back to all changes in this revision

Viewing changes to tests/mem_udp.cc

  • Committer: Continuous Integration
  • Date: 2013-04-02 10:00:47 UTC
  • mfrom: (1153.1.1 libmemcached-1.0)
  • Revision ID: ci@tangent.org-20130402100047-dwent80x5y7t4wxv
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-248

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
{
107
107
  for (uint32_t x= 0; x < memcached_server_count(memc); x++)
108
108
  {
109
 
    memcached_server_instance_st instance= memcached_server_instance_by_position(memc, x);
 
109
    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, x);
110
110
 
111
 
    ids.push_back(get_udp_datagram_request_id((struct udp_datagram_header_st *) ((memcached_server_instance_st )instance)->write_buffer));
 
111
    ids.push_back(get_udp_datagram_request_id((struct udp_datagram_header_st *) ((const memcached_instance_st * )instance)->write_buffer));
112
112
  }
113
113
}
114
114
 
173
173
  (void)memc;
174
174
#if 0
175
175
  memcached_server_st server;
176
 
  memcached_server_instance_st instance=
 
176
  const memcached_instance_st * instance=
177
177
    memcached_server_instance_by_position(memc, 0);
178
178
  memcached_server_clone(&server, &memc->hosts[0]);
179
179
  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
188
188
  (void)memc;
189
189
#if 0
190
190
  memcached_server_st server;
191
 
  memcached_server_instance_st instance=
 
191
  const memcached_instance_st * instance=
192
192
    memcached_server_instance_by_position(memc, 0);
193
193
  memcached_server_clone(&server, &memc->hosts[0]);
194
194
  test_true(memcached_server_remove(&(memc->hosts[0])) == MEMCACHED_SUCCESS);
284
284
    get_udp_request_ids(memc, expected_ids);
285
285
    unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
286
286
    test_true(server_key < memcached_server_count(memc));
287
 
    memcached_server_instance_st instance= memcached_server_instance_by_position(memc, server_key);
 
287
    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, server_key);
288
288
    size_t init_offset= instance->write_buffer_offset;
289
289
 
290
290
    test_compare_hint(MEMCACHED_SUCCESS, 
349
349
    get_udp_request_ids(memc, expected_ids);
350
350
 
351
351
    unsigned int server_key= memcached_generate_hash(memc, test_literal_param("foo"));
352
 
    memcached_server_instance_st instance= memcached_server_instance_by_position(memc, server_key);
 
352
    const memcached_instance_st * instance= memcached_server_instance_by_position(memc, server_key);
353
353
    size_t init_offset= instance->write_buffer_offset;
354
354
 
355
355
    test_compare(MEMCACHED_SUCCESS,