~mordred/libmemcached/fix-weird-link

« back to all changes in this revision

Viewing changes to lib/memcached_do.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_do(memcached_server_st *ptr, char *command, 
4
 
                              size_t command_length, uint8_t with_flush)
5
 
{
6
 
  memcached_return rc;
7
 
  ssize_t sent_length;
8
 
 
9
 
  WATCHPOINT_ASSERT(command_length);
10
 
  WATCHPOINT_ASSERT(command);
11
 
 
12
 
  if ((rc= memcached_connect(ptr)) != MEMCACHED_SUCCESS)
13
 
    return rc;
14
 
 
15
 
  sent_length= memcached_io_write(ptr, command, command_length, with_flush);
16
 
 
17
 
  if (sent_length == -1 || sent_length != command_length)
18
 
    rc= MEMCACHED_WRITE_FAILURE;
19
 
  else
20
 
    memcached_server_response_increment(ptr);
21
 
 
22
 
  return rc;
23
 
}