projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Remove special condition for block and version.
[awesomized/libmemcached]
/
libmemcached
/
io.c
diff --git
a/libmemcached/io.c
b/libmemcached/io.c
index 6ecac2457bb64b44dfcd8f4a94fb814e4eda89f7..9f38af5c213d51d6cc4b57e781b537ded58000dd 100644
(file)
--- a/
libmemcached/io.c
+++ b/
libmemcached/io.c
@@
-12,8
+12,6
@@
#include "common.h"
#include "common.h"
-#include <assert.h>
-
typedef enum {
MEM_READ,
MEM_WRITE
typedef enum {
MEM_READ,
MEM_WRITE
@@
-384,7
+382,6
@@
static ssize_t _io_write(memcached_server_write_instance_st ptr,
should_write= length;
if (ptr->write_buffer_offset + should_write > buffer_end)
{
should_write= length;
if (ptr->write_buffer_offset + should_write > buffer_end)
{
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
}
return -1;
}
}
@@
-427,7
+424,6
@@
static ssize_t _io_write(memcached_server_write_instance_st ptr,
WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
if (io_flush(ptr, &rc) == -1)
{
WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET);
if (io_flush(ptr, &rc) == -1)
{
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
return -1;
}
@@
-579,7
+575,6
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
{
if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_STORED)
{
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
}
return -1;
}
}
@@
-595,7
+590,6
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
// UDP Sanity check, make sure that we are not sending somthing too big
if (ptr->type == MEMCACHED_CONNECTION_UDP && write_length > MAX_UDP_DATAGRAM_LENGTH)
{
// UDP Sanity check, make sure that we are not sending somthing too big
if (ptr->type == MEMCACHED_CONNECTION_UDP && write_length > MAX_UDP_DATAGRAM_LENGTH)
{
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
return -1;
}
@@
-619,7
+613,7
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
if (ptr->type == MEMCACHED_CONNECTION_UDP)
increment_udp_message_id(ptr);
if (ptr->type == MEMCACHED_CONNECTION_UDP)
increment_udp_message_id(ptr);
-
assert
(ptr->fd != -1);
+
WATCHPOINT_ASSERT
(ptr->fd != -1);
sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
if (sent_length == SOCKET_ERROR)
{
sent_length= send(ptr->fd, local_write_ptr, write_length, 0);
if (sent_length == SOCKET_ERROR)
{
@@
-654,15
+648,14
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
continue;
memcached_quit_server(ptr, true);
continue;
memcached_quit_server(ptr, true);
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
case ENOTCONN:
case EPIPE:
default:
return -1;
}
case ENOTCONN:
case EPIPE:
default:
- fprintf(stderr, "%s:%d (%s)(%s)\n", __FILE__, __LINE__,__func__, strerror(errno));fflush(stdout);
memcached_quit_server(ptr, true);
*error= MEMCACHED_ERRNO;
memcached_quit_server(ptr, true);
*error= MEMCACHED_ERRNO;
+ WATCHPOINT_ASSERT(ptr->fd == -1);
return -1;
}
}
return -1;
}
}
@@
-671,7
+664,6
@@
static ssize_t io_flush(memcached_server_write_instance_st ptr,
(size_t)sent_length != write_length)
{
memcached_quit_server(ptr, true);
(size_t)sent_length != write_length)
{
memcached_quit_server(ptr, true);
- fprintf(stderr, "%s:%d (%s)\n", __FILE__, __LINE__,__func__);fflush(stdout);
return -1;
}
return -1;
}