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
83f39c7a
Commit
83f39c7a
authored
Sep 16, 2010
by
antirez
Browse files
Merge remote branch 'pietern/networking-perf'
parents
89f9f837
f3357792
Changes
2
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
83f39c7a
...
@@ -11,11 +11,7 @@ int listMatchObjects(void *a, void *b) {
...
@@ -11,11 +11,7 @@ int listMatchObjects(void *a, void *b) {
}
}
redisClient
*
createClient
(
int
fd
)
{
redisClient
*
createClient
(
int
fd
)
{
redisClient
*
c
;
redisClient
*
c
=
zmalloc
(
sizeof
(
redisClient
));
/* Allocate more space to hold a static write buffer. */
c
=
zmalloc
(
sizeof
(
redisClient
)
+
REDIS_REPLY_CHUNK_BYTES
);
c
->
buflen
=
REDIS_REPLY_CHUNK_BYTES
;
c
->
bufpos
=
0
;
c
->
bufpos
=
0
;
anetNonBlock
(
NULL
,
fd
);
anetNonBlock
(
NULL
,
fd
);
...
@@ -87,7 +83,7 @@ robj *dupLastObjectIfNeeded(list *reply) {
...
@@ -87,7 +83,7 @@ robj *dupLastObjectIfNeeded(list *reply) {
}
}
int
_addReplyToBuffer
(
redisClient
*
c
,
char
*
s
,
size_t
len
)
{
int
_addReplyToBuffer
(
redisClient
*
c
,
char
*
s
,
size_t
len
)
{
size_t
available
=
c
->
buf
len
-
c
->
bufpos
;
size_t
available
=
sizeof
(
c
->
buf
)
-
c
->
bufpos
;
/* If there already are entries in the reply list, we cannot
/* If there already are entries in the reply list, we cannot
* add anything more to the static buffer. */
* add anything more to the static buffer. */
...
...
src/redis.h
View file @
83f39c7a
...
@@ -313,8 +313,7 @@ typedef struct redisClient {
...
@@ -313,8 +313,7 @@ typedef struct redisClient {
/* Response buffer */
/* Response buffer */
int
bufpos
;
int
bufpos
;
int
buflen
;
char
buf
[
REDIS_REPLY_CHUNK_BYTES
];
char
buf
[];
}
redisClient
;
}
redisClient
;
struct
saveparam
{
struct
saveparam
{
...
...
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