~brianaker/libmemcached/1251482

« back to all changes in this revision

Viewing changes to libmemcached/response.cc

  • Committer: Continuous Integration
  • Date: 2013-10-11 10:57:29 UTC
  • mfrom: (1169.1.3 key-cleanup)
  • Revision ID: ci@tangent.org-20131011105729-icge7t4g8wr4g380
Merge lp:~brianaker/libmemcached/key-cleanup/ Build: jenkins-Libmemcached-369

Show diffs side-by-side

added added

removed removed

Lines of Context:
500
500
  memcached_return_t rc;
501
501
  protocol_binary_response_header header;
502
502
 
 
503
  assert(memcached_is_binary(instance->root));
 
504
 
503
505
  if ((rc= memcached_safe_read(instance, &header.bytes, sizeof(header.bytes))) != MEMCACHED_SUCCESS)
504
506
  {
505
507
    WATCHPOINT_ERROR(rc);
892
894
    return memcached_set_error(*instance, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT);
893
895
  }
894
896
 
895
 
  /* We may have old commands in the buffer not set, first purge */
 
897
  /* We may have old commands in the buffer not sent, first purge */
896
898
  if ((instance->root->flags.no_block) and (memcached_is_processing_input(instance->root) == false))
897
899
  {
898
900
    (void)memcached_io_write(instance);
899
901
  }
900
902
 
 
903
  /*  Before going into loop wait to see if we have any IO waiting for us */
 
904
  if (0)
 
905
  {
 
906
    memcached_return_t read_rc= memcached_io_wait_for_read(instance);
 
907
    fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, memcached_strerror(NULL, read_rc));
 
908
  }
 
909
 
901
910
  /*
902
911
   * The previous implementation purged all pending requests and just
903
912
   * returned the last one. Purge all pending messages to ensure backwards