Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
cc017c58
Commit
cc017c58
authored
Nov 01, 2012
by
Salvatore Sanfilippo
Browse files
Merge pull request #743 from Cofyc/fixtypo
fix typo in comments (redis.c, networking.c)
parents
b6ffa85f
ed44a74e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
cc017c58
...
...
@@ -489,8 +489,8 @@ void copyClientOutputBuffer(redisClient *dst, redisClient *src) {
static
void
acceptCommonHandler
(
int
fd
,
int
flags
)
{
redisClient
*
c
;
if
((
c
=
createClient
(
fd
))
==
NULL
)
{
redisLog
(
REDIS_WARNING
,
"Error allocating resoures for the client"
);
close
(
fd
);
/* May be already closed, just i
n
gore errors */
redisLog
(
REDIS_WARNING
,
"Error allocating resour
c
es for the client"
);
close
(
fd
);
/* May be already closed, just ig
n
ore errors */
return
;
}
/* If maxclient directive is set and this is one client more... close the
...
...
@@ -991,9 +991,9 @@ void readQueryFromClient(aeEventLoop *el, int fd, void *privdata, int mask) {
server
.
current_client
=
c
;
readlen
=
REDIS_IOBUF_LEN
;
/* If this is a multi bulk request, and we are processing a bulk reply
* that is large enough, try to maximize the probabilty that the query
* buffer contains ex
c
atly the SDS string representing the object, even
* at the risk of requring more read(2) calls. This way the function
* that is large enough, try to maximize the probabil
i
ty that the query
* buffer contains exa
c
tly the SDS string representing the object, even
* at the risk of requ
i
ring more read(2) calls. This way the function
* processMultiBulkBuffer() can avoid copying buffers to create the
* Redis Object representing the argument. */
if
(
c
->
reqtype
==
REDIS_REQ_MULTIBULK
&&
c
->
multibulklen
&&
c
->
bulklen
!=
-
1
...
...
@@ -1231,7 +1231,7 @@ unsigned long getClientOutputBufferMemoryUsage(redisClient *c) {
return
c
->
reply_bytes
+
(
list_item_size
*
listLength
(
c
->
reply
));
}
/* Get the class of a client, used in order to en
v
orce limits to different
/* Get the class of a client, used in order to en
f
orce limits to different
* classes of clients.
*
* The function will return one of the following:
...
...
src/redis.c
View file @
cc017c58
...
...
@@ -1527,7 +1527,7 @@ void call(redisClient *c, int flags) {
}
/* If this function gets called we already read a whole
* command, argments are in the client argv/argc fields.
* command, arg
u
ments are in the client argv/argc fields.
* processCommand() execute the command or prepare the
* server for a bulk read from the client.
*
...
...
@@ -2175,7 +2175,7 @@ void infoCommand(redisClient *c) {
}
void
monitorCommand
(
redisClient
*
c
)
{
/* ignore MONITOR if aleady slave or in monitor mode */
/* ignore MONITOR if al
r
eady slave or in monitor mode */
if
(
c
->
flags
&
REDIS_SLAVE
)
return
;
c
->
flags
|=
(
REDIS_SLAVE
|
REDIS_MONITOR
);
...
...
@@ -2274,7 +2274,7 @@ int freeMemoryIfNeeded(void) {
de
=
dictGetRandomKey
(
dict
);
thiskey
=
dictGetKey
(
de
);
/* When policy is volatile-lru we need an additonal lookup
/* When policy is volatile-lru we need an addit
i
onal lookup
* to locate the real key, as dict is set to db->expires. */
if
(
server
.
maxmemory_policy
==
REDIS_MAXMEMORY_VOLATILE_LRU
)
de
=
dictFind
(
db
->
dict
,
thiskey
);
...
...
@@ -2576,7 +2576,7 @@ int main(int argc, char **argv) {
redisAsciiArt
();
if
(
!
server
.
sentinel_mode
)
{
/* Things only needed when not runni
g
n in Sentinel mode. */
/* Things only needed when not runnin
g
in Sentinel mode. */
redisLog
(
REDIS_WARNING
,
"Server started, Redis version "
REDIS_VERSION
);
#ifdef __linux__
linuxOvercommitMemoryWarning
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment