projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
docs: gzip manpages
[awesomized/libmemcached]
/
libmemcached
/
error.cc
diff --git
a/libmemcached/error.cc
b/libmemcached/error.cc
index ab17926e67cf27d3941fffd111eec606def06a29..3de8ece52be8ef41055b1dfb88e864de77d57da3 100644
(file)
--- a/
libmemcached/error.cc
+++ b/
libmemcached/error.cc
@@
-216,21
+216,20
@@
static void _set(Memcached& memc, memcached_string_t *str, memcached_return_t &r
error->next= memc.error_messages;
memc.error_messages= error;
error->next= memc.error_messages;
memc.error_messages= error;
- }
-
#if 0
#if 0
- if (error_log_fd == -1)
- {
-// unlink("/tmp/libmemcachd.log");
- if ((error_log_fd= open("/tmp/libmemcachd.log", O_CREAT | O_WRONLY | O_APPEND, 0644)) < 0)
+ if (error_log_fd == -1)
{
{
- perror("open");
- error_log_fd= -1;
+ // unlink("/tmp/libmemcachd.log");
+ if ((error_log_fd= open("/tmp/libmemcachd.log", O_CREAT | O_WRONLY | O_APPEND, 0644)) < 0)
+ {
+ perror("open");
+ error_log_fd= -1;
+ }
}
}
- }
- ::write(error_log_fd, error->message, error->size);
- ::write(error_log_fd, "\n", 1);
+ ::write(error_log_fd, error->message, error->size);
+ ::write(error_log_fd, "\n", 1);
#endif
#endif
+ }
}
memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, const char *str, size_t length)
}
memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, const char *str, size_t length)
@@
-652,7
+651,7
@@
memcached_return_t memcached_server_error_return(const memcached_instance_st * p
return MEMCACHED_INVALID_ARGUMENTS;
}
return MEMCACHED_INVALID_ARGUMENTS;
}
- if (ptr
and ptr
->error_messages)
+ if (ptr->error_messages)
{
return ptr->error_messages->rc;
}
{
return ptr->error_messages->rc;
}
@@
-667,7
+666,7
@@
memcached_return_t memcached_instance_error_return(memcached_instance_st* instan
return MEMCACHED_INVALID_ARGUMENTS;
}
return MEMCACHED_INVALID_ARGUMENTS;
}
- if (instance
and instance
->error_messages)
+ if (instance->error_messages)
{
return instance->error_messages->rc;
}
{
return instance->error_messages->rc;
}